No API token can be selected
Gitlab plugin version: 1.2.5 Gitlab version: 8.8.1 Jenkins version: 1.648
I also setup loggin to more detail, but nothing relevant is logged. I followed the documentation, created a user in gitlab, added its API key to a credentials storage as Gitlab API token. But when I want to select it in Global settings and paths, I can't select anything. Dropdown menu shows only none.

When you set up the credential, what type did you specify? It should be "GitLab API Token."
There was the same Problem This was resolved successfully upgrade Jenkins 1.648 to Jenkins 2.x
The credential was specified as GitLab API Token.

@kranian OK, thanks for the info. I have upgraded to the latest LTS version 1.651.3, but still the credentials isn't show. Does this work only on Jenkins 2.x?
No , I did the same with the lastest 1.651.3 , I seem to be not supported lastest 1.651.3
so I tried to upgrade to LTS Jenkis2.11

Same issue here on 1.649, Any chance this can be made to work on 1.x for now ?
major version upgrades require a lot of testing ...
I was worried Manager version upgrade. but After checking in at the official website as Jekins 2.x support backwards compatibility plugin.
I just updated the Jenkins war to the latest 2.11 version, but it still doesn't work, so I guess the problem is elsewhere. Because I have also a docker version of Jenkins 2.3 which is works OK. Does anyone have any idea, what could it be?
Oh, I see, I think you need another solution
The issue can be closed. The plugin is working on 2.x release, I uninstalled the plugin, restarted the system and again installed the plugin and it started working.
@coder-hugo can you clarify the compatibility target for gitlab-plugin ? using
- plugin 1.2.5
- jenkins 1.649
- GitLab Community Edition 8.9.0 0d457d8
I can't select gitlab token credentials and therefore can't connect my jenkins to gitlab.
I have the token with gitlab token type
but I can't select them

Since i don't administer the jenkins instance myself, I'd like to know what to request :
- upgrade to 1.651.3 (might be considered by the admins)
- upgrade to 2. x (which means I'm out of luck)
Thanks
@jeantil during the development the gitlab-plugin runs in a Jenkins 1.609.3 and I can select a API token. So I'd assume there is an issue with the installed version of the credentials-plugin not with the version of the Jenkins itself.
@coder-hugo do we need to update the plugin's pom.xml to require a certain version of the credentials-plugin?
@coder-hugo thanks for your answer. Which version of the credentials plugin should we be using ? The one installed at the moment is 2.1.4 and as far as I can tell it's the latest one.
@jeantil I just tested the plugin with a clean installation of Jenkins 1.649 and the credentials plugin 2.1.4 and I have no issues selecting the credentials. So the issue seems to be related to your Jenkins installation/configuration.
we're seeing the same issue, unable to select any credentials from the dropdown (even after a clean reinstall of the plugin). jenkins 2.13 plugin 1.3.0
@jeantil @paulatbipsync could you please check if the issue still exists with the current master? Either by building it with mvn clean package or by downloading it from the cloudbees Jenkins: gitlab-plugin-1.3.1-SNAPSHOT.hpi. I did a minor change (8da0bf2945d816778481c30ffd91a372b45fbb21) in the code that retrieve the available credentials but I'm not sure if this solves your issue as I can't reproduce it.
@coder-hugo Just tested the snapshot release you mentioned, but no luck. I'm experiencing this issue on jenkins 2.7.1 with plugin 1.3.0 + 1.3.1snapshot
I have the same issue with Jenkins 1.651, GitLab plugin 1.3.0, Credentials plugin 2.1.4.
The problem is that the URL
http://jenkins/descriptorByName/com.dabsquared.gitlabjenkins.connection.GitLabConnectionConfig/fillApiTokenIdItems
returns this:
{"values":[{"name":"- none -","selected":false,"value":""}]}
And nothing in the logs.
I was able to work around this with this trick:
- Go to Credentials, create your GitLab API Token, and set the specific ID (e.g., "jenkins-to-gitlab").
- On the Configure page, enable browser devtools (Cmd+Opt+I in Chrome), locate the
<select>tag for this token field, expand it, find the<option>tag for "-none-" pseudo-token (the only<opton>tag there). - Replace its value & its text with "jenkins-to-gitlab" (the token id from the 1st step).
- Save/apply the configuration.
- Click the Test Connection button — it works (see "Success" message).
When you will be changing the configuration again, leave it as "-current-".
I have also the issue with
GitLab Plugin : 1.3.0
Credentials Plugin : 2.1.4
Jenkins : 1.651.3
I have the same issue with
Jenkins 2.7.1 GitLab Plugin 1.3.0 Credentials Plugin: 2.1.4