Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Docker Registry
  3. How to authenticate in gitlab pipline?

How to authenticate in gitlab pipline?

Scheduled Pinned Locked Moved Solved Docker Registry
22 Posts 6 Posters 3.8k Views 6 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • klawitterbK Offline
    klawitterbK Offline
    klawitterb
    wrote on last edited by
    #1

    Hey,
    I've set up the registry and the gitlab connection as described in the documentation.
    How do I now set up my pipline to be able to push to the registry?
    Do I need to login first using docker login? What credentials do I need to use there?

    mehdiM 1 Reply Last reply
    0
    • klawitterbK klawitterb

      Hey,
      I've set up the registry and the gitlab connection as described in the documentation.
      How do I now set up my pipline to be able to push to the registry?
      Do I need to login first using docker login? What credentials do I need to use there?

      mehdiM Offline
      mehdiM Offline
      mehdi
      App Dev
      wrote on last edited by
      #2

      @klawitterb What I'm doing, on a non-cloudron setup, is that I created a service user allowed only on the registry, added its credentials to the secret CI variables on the gitlab project configuration, then in the .gitlab-ci.yml I do :

      docker login -u $CI_USER -p $CI_USER_PASSWORD my.registry.url.com
      
      1 Reply Last reply
      0
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #3

        See this article also - https://about.gitlab.com/blog/2016/05/23/gitlab-container-registry/

        mehdiM 1 Reply Last reply
        0
        • girishG girish

          See this article also - https://about.gitlab.com/blog/2016/05/23/gitlab-container-registry/

          mehdiM Offline
          mehdiM Offline
          mehdi
          App Dev
          wrote on last edited by
          #4

          @girish That's only if you use the integrated container registry in gitlab Omnibus image, not an external one like on Cloudron

          girishG 1 Reply Last reply
          0
          • mehdiM mehdi

            @girish That's only if you use the integrated container registry in gitlab Omnibus image, not an external one like on Cloudron

            girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #5

            @mehdi Ah, I was just refering to the "Start using it" section. It has some examples on how to use with a CI_BUILD_TOKEN

            mehdiM 1 Reply Last reply
            0
            • ? Offline
              ? Offline
              A Former User
              wrote on last edited by
              #6

              Out of curiosity, why don’t we try the omnibus image on cloudron? Is it a lack of visibility or control into stuff like LDAP or something? Or just complexity of packaging

              1 Reply Last reply
              0
              • girishG girish

                @mehdi Ah, I was just refering to the "Start using it" section. It has some examples on how to use with a CI_BUILD_TOKEN

                mehdiM Offline
                mehdiM Offline
                mehdi
                App Dev
                wrote on last edited by
                #7

                @girish Yeah, but the authentication using CI_BUILD_TOKEN only works when it's the integrated registry

                girishG 1 Reply Last reply
                1
                • mehdiM mehdi

                  @girish Yeah, but the authentication using CI_BUILD_TOKEN only works when it's the integrated registry

                  girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #8

                  @mehdi Ah, got it, I misunderstood the original question entirely.

                  1 Reply Last reply
                  0
                  • klawitterbK Offline
                    klawitterbK Offline
                    klawitterb
                    wrote on last edited by
                    #9

                    Using pipeline variables to login to docker.io is working without problems for me. But I can't get the authentication to the cloudron registry to work.
                    I've set up the auth part as described in the documentation using tokens. Do I now need to acquire a token first before I can login?
                    Also tried changing the auth to htpasswd on the docker registry without success. It still wont let me in, rejecting the request with a 403.

                    mehdiM 1 Reply Last reply
                    0
                    • klawitterbK klawitterb

                      Using pipeline variables to login to docker.io is working without problems for me. But I can't get the authentication to the cloudron registry to work.
                      I've set up the auth part as described in the documentation using tokens. Do I now need to acquire a token first before I can login?
                      Also tried changing the auth to htpasswd on the docker registry without success. It still wont let me in, rejecting the request with a 403.

                      mehdiM Offline
                      mehdiM Offline
                      mehdi
                      App Dev
                      wrote on last edited by
                      #10

                      @klawitterb :

                      • which documentation are you talking about ?
                      • have you tried logging in from your local machine ? Does that work ?
                      klawitterbK 1 Reply Last reply
                      0
                      • mehdiM mehdi

                        @klawitterb :

                        • which documentation are you talking about ?
                        • have you tried logging in from your local machine ? Does that work ?
                        klawitterbK Offline
                        klawitterbK Offline
                        klawitterb
                        wrote on last edited by
                        #11

                        @mehdi I'm referring to the documentation on the cloudron docs: https://docs.cloudron.io/apps/docker-registry/

                        I'm not even seeing log entries when trying to connect. Shouldn't it at least tell me about the failed login?

                        1 Reply Last reply
                        0
                        • klawitterbK Offline
                          klawitterbK Offline
                          klawitterb
                          wrote on last edited by
                          #12

                          Stupid me, just read the docs again that I only need to set this up for gitlab integration. Removed the auth config and was now able to successfully login using cloudron credentials.

                          calenoC 1 Reply Last reply
                          2
                          • ? Offline
                            ? Offline
                            A Former User
                            wrote on last edited by
                            #13

                            Weird... it just keeps timing out for me when I try a docker push

                            1 Reply Last reply
                            0
                            • ? Offline
                              ? Offline
                              A Former User
                              wrote on last edited by
                              #14

                              Nevermind... got it working just fine.

                              girishG 1 Reply Last reply
                              0
                              • ? A Former User

                                Nevermind... got it working just fine.

                                girishG Offline
                                girishG Offline
                                girish
                                Staff
                                wrote on last edited by
                                #15

                                @atrilahiji What did you do here? it seems this might be the source of the update issue which you mention in the other thread...

                                ? 2 Replies Last reply
                                0
                                • girishG girish

                                  @atrilahiji What did you do here? it seems this might be the source of the update issue which you mention in the other thread...

                                  ? Offline
                                  ? Offline
                                  A Former User
                                  wrote on last edited by A Former User
                                  #16

                                  @girish oh I reinstalled making sure it used the apps user management. This was before my update issue

                                  1 Reply Last reply
                                  0
                                  • girishG girish

                                    @atrilahiji What did you do here? it seems this might be the source of the update issue which you mention in the other thread...

                                    ? Offline
                                    ? Offline
                                    A Former User
                                    wrote on last edited by
                                    #17

                                    @girish The new update with the UI helped a lot. Reinstalled a version thats is standalone using proxyAuth and a version to integrate with GitLab. Works perfectly. I'll be doing some more extensive testing.

                                    doodlemania2D 1 Reply Last reply
                                    1
                                    • ? A Former User

                                      @girish The new update with the UI helped a lot. Reinstalled a version thats is standalone using proxyAuth and a version to integrate with GitLab. Works perfectly. I'll be doing some more extensive testing.

                                      doodlemania2D Offline
                                      doodlemania2D Offline
                                      doodlemania2
                                      App Dev
                                      wrote on last edited by
                                      #18

                                      @atrilahiji Write up a post on it and we can get it into the docs I bet!

                                      1 Reply Last reply
                                      0
                                      • klawitterbK klawitterb

                                        Stupid me, just read the docs again that I only need to set this up for gitlab integration. Removed the auth config and was now able to successfully login using cloudron credentials.

                                        calenoC Offline
                                        calenoC Offline
                                        caleno
                                        wrote on last edited by
                                        #19

                                        @klawitterb @girish

                                        If I understand it correctly the gitlab integration makes gitlab the authority for docker registry submitting jwt tokens for authentication. To create these tokens you either make a access token deploy token or a personal token (especially if you are using 2fa) and one should be able to authenticate to the registry, correct?

                                        I've tried all sorts of tokens and changing the docker-client in authproxy and nginxconfig without success.

                                        Has anyone manged to get this working? ><

                                        klawitterbK 1 Reply Last reply
                                        0
                                        • calenoC caleno

                                          @klawitterb @girish

                                          If I understand it correctly the gitlab integration makes gitlab the authority for docker registry submitting jwt tokens for authentication. To create these tokens you either make a access token deploy token or a personal token (especially if you are using 2fa) and one should be able to authenticate to the registry, correct?

                                          I've tried all sorts of tokens and changing the docker-client in authproxy and nginxconfig without success.

                                          Has anyone manged to get this working? ><

                                          klawitterbK Offline
                                          klawitterbK Offline
                                          klawitterb
                                          wrote on last edited by
                                          #20

                                          @caleno
                                          I removed the auth token config from the docker registry and used the normal docker login cmd in my pipeline using my normal cloudron account name + an app password.

                                          calenoC 1 Reply Last reply
                                          1
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Bookmarks
                                          • Search