Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-36863

[Gitlab plugin] Credentials drop-down doesn't show API token credential!

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: gitlab-plugin
    • Labels:
    • Environment:
      Gitlab Plugin 1.3.0. Jenkins 2.7.1 hosted on Windows 7 64-bit, Java 1.8 64-bit. Client is Chrome 51 on Windows 10
    • Similar Issues:

      Description

      On Manage Jenkins -> Configure System, in the Gitlab section, there's a Credentials section that had a drop-down list where I should be able to specify an API Token. The drop down says "-none" and has no other options. If I choose Add -> Jenkins, then under Kind I can select "GitLab API token" and put in the info, and click Add. But the credential I've added does not show up in the drop-down, so I can't select it, and I have the red "API Token for Gitlab access required" message.

      I expect to be able to see the API token credential I have added in the drop-down list so I can select it and connect. But it is not there.

      As a result I am unable to use the plugin at all.

        Attachments

        1. 123.png
          123.png
          8 kB
        2. 1234.png
          1234.png
          30 kB
        3. abc.png
          abc.png
          93 kB
        4. jenkins-gitlab-api-token-bug.png
          jenkins-gitlab-api-token-bug.png
          100 kB
        5. support_2016-08-03_03.23.23.zip
          110 kB

          Activity

          Hide
          ssrey sokunrotanak ssrey added a comment -

          After I updated jenkins to 2.46.3, I have the same problem.

          In system configure, I will have to reload the browser several times before the dropdown box show any options. However, I did not get it to show anything in the project configure.

           

          Here are my plugins:

          CloudBees Credentials Plugin          v 3.3

          Credentials Plugin                             v 2.1.13

          Plain Credentials Plugin                    v 1.4

          SSH Credentials Plugin                     v 1.13

          Show
          ssrey sokunrotanak ssrey added a comment - After I updated jenkins to 2.46.3, I have the same problem. In system configure, I will have to reload the browser several times before the dropdown box show any options. However, I did not get it to show anything in the project configure.   Here are my plugins: -  CloudBees Credentials Plugin           v 3.3 -  Credentials Plugin                              v 2.1.13 -  Plain Credentials Plugin                     v 1.4 -  SSH Credentials Plugin                      v 1.13
          Hide
          enigma nikesh s added a comment - - edited

          It's not a bug. It was willingly excluded from the dropdown list. These credentials won't be any way used in the connection.

          You should define it in the GitLab connection dropdown.

          you can have a look at Gitlab plugin documentations

          Show
          enigma nikesh s added a comment - - edited It's not a bug. It was willingly excluded from the dropdown list. These credentials won't be any way used in the connection. You should define it in the GitLab connection dropdown. you can have a look at Gitlab plugin documentations
          Hide
          vgerris Vincent Gerris added a comment -

          Why was this closed? I still have this issue with Jenkins 2.222.4 installed with Helm on GKE. It looks like the credentials are not stored, which is a bug I think. Another bug would be that these credentials would not be used, which I think is incorrect, because they seem to be used for fetching status ( and are different from the git credentials).
          Please reopen this 

          Show
          vgerris Vincent Gerris added a comment - Why was this closed? I still have this issue with Jenkins 2.222.4 installed with Helm on GKE. It looks like the credentials are not stored, which is a bug I think. Another bug would be that these credentials would not be used, which I think is incorrect, because they seem to be used for fetching status ( and are different from the git credentials). Please reopen this 
          Hide
          mangeorge George Beliy added a comment -

          I still have this issue with Jenkins 2.249.2.
          GitLab credentials are added fine under the global Jenkins settings page (/configure), but these are not available in the job configuration git credential dropdown

          Here are my plugins:

          • Credentials Plugin v 2.3.13
          • Plain Credentials Plugin v 1.7
          • SSH Credentials Plugin v 1.18.1
          • GitLab Plugin v 1.5.13
          Show
          mangeorge George Beliy added a comment - I still have this issue with Jenkins 2.249.2. GitLab credentials are added fine under the global Jenkins settings page (/configure), but these are not available in the job configuration git credential dropdown Here are my plugins: Credentials Plugin v 2.3.13 Plain Credentials Plugin v 1.7 SSH Credentials Plugin v 1.18.1 GitLab Plugin v 1.5.13
          Hide
          vgerris Vincent Gerris added a comment -

          Hi, I had this issue before with an older version but it works for me now on 2.249.2 on 2 different instances.
          Make sure all plugins are updated and that the jenkins server is restarted.
          Perhaps try to see if you have the same issue with secrets.
          I use that too and maybe that flipped a bit that made it work.
          In the end I don't know exactly what resolved my issue, but it works fine now with both secrets and gitlab credentials stored in jenkins global.

          Show
          vgerris Vincent Gerris added a comment - Hi, I had this issue before with an older version but it works for me now on 2.249.2 on 2 different instances. Make sure all plugins are updated and that the jenkins server is restarted. Perhaps try to see if you have the same issue with secrets. I use that too and maybe that flipped a bit that made it work. In the end I don't know exactly what resolved my issue, but it works fine now with both secrets and gitlab credentials stored in jenkins global.

            People

            Assignee:
            coderhugo Robin Müller
            Reporter:
            tyrelh Tyrel Haveman
            Votes:
            5 Vote for this issue
            Watchers:
            18 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: