Open JordanRoss1992 opened 3 years ago
We have the same problem in our Jenkins LTS 2.277.1 The Credentials list is not populated. We even have a GitLab API Token Credentials there.
Though we do not get that error message when entering the URL to our GitLab instance.
I came across this issue https://github.com/jenkinsci/gitlab-branch-source-plugin/issues/107
Seems the GitLab API Token is for GitLab Plugin and cannot be used for GitLab Branch Source Plugin. Creating a new GitLab Personal Access Token Credentials is the solution here.
I solved this by creating a GitLab API Token
and NOT the GitLab Personal Update Token
.
The created API Token credential shows up in the Credentials drop down menu.
Wonder what I'm doing differently - I tried adding credentials both in System Configuration and Credentials Configuration - have added both Gitlab API tokens and Gitlab personal access tokens.
I still do not get anything in the "Credentials" dropdown when trying to configure the plugin.. only shows "-none-".
Credentials plugin is fully updated - 2.5 Gitlab Branch source plugin fully updated - 1.5.8
Does anyone have a step-by-step solution that worked for them, that was experiencing this same issue?
I am experiencing the same problem. Has anyone found a solution?
@teodor20 the workaround mentioned by @basyskom-hlei failed for you as well, yes?
@robslabarbera The only solution that works for me is creating GitLab Personal Access Token Credentials, same as what @DJViking did.
Creating GitLab API Token does not work (it never shows up in the dropdown). None of the other credentials added to Jenkins show up either. We already have a GitLab token used for the GitLab plugin and I was hoping to use it for this plugin as well.
@teodor20 and @DJViking Can you give exact steps you took to achieve this? I have tried both of these and neither worked. For the GitLab Personal Access Token Credentials, this is what I did.
Settigns
-> Access Tokens
Select a role
, I selected Owner
. I also tried Maintainer
api
for the Select scopes
Create project access toekn
New Item
Multibranch Pipeline
Branch Sources
section, I select Add source
-> GitLab Project
Add
and select Jenkins
Kind
I select GitLab Personal Access Token
Token
field, I put my tokenAdd
Manage Jenkins
-> Credentials
and added them there as well. If I go to System
and find the Gitlab Server that I added, I can find my credentials there, and clicking Test Connection
works. However, the credentials never show up for my individual Pipelines
When configuring GitLab Servers in the Jenkins global configuration, the credentials dropdown doesn't populate with system credentials.
We have a private GitLab server on the same network as our Cloudbees instance. After entering the GitLab URL in the URL field, the UI shows an "Invalid GitLab Server URL".
I did some digging into the source code and figured out that it tries to hit the /projects API of the gitlab instance in order to validate the location. For our instance, you can't hit the /projects API unless you're authorized. Since the credentials drop down seemingly doesn't populate unless you've entered a "valid" gitlab URL (or maybe not at all?), we can't select creds to authorize the GitLab validity check with.
Also, adding new credentials from this configuration doesn't populate the drop down, but it does at them to the list of system credentials for the Jenkins managed master.
Screen shot below: