jenkinsci / ghprb-plugin

github pull requests builder plugin for Jenkins
https://plugins.jenkins.io/ghprb/
MIT License
501 stars 608 forks source link

Credentials dropdown does not show newly created credentials #534

Open karianna opened 7 years ago

karianna commented 7 years ago

Attempted to add a new (Jenkins Credential Provider) Credentials but upon saving the new credential it does not appear in the Credentials dropdown.

Jenkins ver. 2.63 and GitHub Pull Request Builder 1.37.0 with plain credentials plugin 1.4 and Credentials plugin version 2.1.13

karianna commented 7 years ago

This is only true for when I create a api.github.com credential. When creating a global one this appears in the list.

jmcardon commented 7 years ago

@karianna +1 on this issue

EkiGui commented 6 years ago

I had the same issue when using an SSH based authentication, but it worked fine with Username/Password credentials. Still, there's something going awry here...

jitendrakhedar commented 6 years ago

I am having the same issue. Can anyone provide me the solution?

generatz commented 6 years ago

@karianna Jenkins 2.73.3; in my experience with setting up the Jenkins system configuration for GitHub plugin, the credential "Kind" field must be "Secret text". I tried adding two or three other types of credentials, but they do not subsequently appear in the Credentials dropdown. See "2. At Credential level" section discussion here: https://support.cloudbees.com/hc/en-us/articles/224543927-GitHub-webhook-configuration

theSupermacy commented 6 years ago

This is happening to me also. Trying to add credentials with username and password. But it is not showing me the added credentials. Need Help!!

RameshThangamuthu commented 6 years ago

+1 for this issue

RameshThangamuthu commented 6 years ago

For me, When I create multi-branch pipeline and choose source type as Bitbucket, the Bitbucket Branch Source plugin does not list the credential of type "secret text" "SSH with user and private key"

unlikelyzero commented 6 years ago

The documentation needs to be updated to make it clear that 'Secret Text' cannot be used with this plugin -- it must be a username / password credential.

neil-benn commented 6 years ago

Me too; username/password is what I'm using but when you add credentials it doesn't get added to the drop down box. First time coming back to Jenkins after 5 years and it doesn't seem to have got any easier :(!

RiaanLab commented 6 years ago

+1

jpswade commented 6 years ago
screen shot 2018-03-14 at 15 54 44

Jenkins ver. 2.111

lawrence615 commented 6 years ago

Anyone struggling with the issue of trying to add credentials with username and password but not showing the creds on the dropdown, try this it worked for me.

Jenkins > Credentials > System > Global Credentials (or whatever group you want to have access or your access allow) > Add Credentials.

Then go back to the Source Code Management section of the project, and select the credentials from the dropdown.

ghost commented 6 years ago

+1

ghost commented 6 years ago

Worked with Secret Text access when I generated a Personal API Token

sophoulis commented 6 years ago

Unfortunately when using BitBucket, the use of "SSH with user and private key" is still not possible. Although I can create the credentials, I cannot use them in the multi-branch pipeline

theDevelopper commented 6 years ago

I have the same issue when using BitBucket and "SSH with user and private key"

ppamorim commented 6 years ago

Still happening... Even doing what @lawrence615 says doesn't work for me...

giorgenes commented 6 years ago

+1

ychaudhari commented 6 years ago

same as @ppamorim... still happening for me in Jenkins v2.121... @lawrence615 's solution did not work unfortunately. I'm trying to add username/password credentials for subversion.

ychaudhari commented 6 years ago

looks like it is resolved for me.

It turns out the credentials show up in drop down when I select Scope as Global (Jenkins, nodes, items, all child items, etc) instead of System (Jenkins and nodes only) .

FYI, parameters that I selected are: Domain: Global credentials (unrestricted) Kind: Username with password Scope: Global (Jenkins, nodes, items, all child items, etc) Username: Password: ID: Description:

Credentials showed up as soon as I added them from Jenkins Credentials Provider pop-up.

NickyWeber commented 6 years ago

+1

SSH credentials not showing up either.

Jenkins 2.122 Pullrequest Builder Plugin 1.4.26

bbu23 commented 6 years ago

After wasting a lot of time, I found the missing step for my case: After adding the credentials, you need navigate to /configure and scroll down to SSH remote hosts Here, you need to add a new host and associate the newly created credentials. I hope this helps !

abobwhite commented 6 years ago

@xtina23 I don't see that option under the configure page...

aantillonl commented 6 years ago

I had a situation also with ssh keys and the GitHub plugin for Jenkins, but before claiming that I "fixed it", lets consider that our issues might be in fact different problems that apparently look the same.

In fact my problem was quite silly. When you add an SSH user with private key credential, it will be listed in the format <user> <description> in the dropdown. Initially I thought my key was not being listed because it was not there by ID, or description, but turns out the listing format is just different to what i was looking for.

babakx commented 6 years ago

For me it seems the problem was that I had "Authorization" plugin installed and enabled for my project. The issue was fixed when I updated "Authorization Strategy" and set it to "Run as who Triggered Build".

image

Phelibus commented 6 years ago

same issue when using BitBucket and "SSH with user and private key" jenkins 2.121.2

AnishBAH commented 6 years ago

To all who are still struggling with above, this is the solution (as of version 2.122):

Your GPAT should automatically validate your account name & resources it has access to along with setting a rate limit for the API. Good luck.

OrenAshkenazy commented 5 years ago

Can someone please confirm it works for BitBucket and SSH Username with private key and what is the workaround?

marcel-kondermann commented 5 years ago

changed from chrome to firefox, then it worked for me

kaisar945 commented 5 years ago

+1 I have same problem help me thanks

walkerlala commented 5 years ago

for those who cannot see the public/private key credential, use "ssh username with private key" instead.

glessit commented 5 years ago

+1

max-l-weaver commented 5 years ago

Hate to be that person but this is happening to me too. It appears each person's "solution" is different from the next. I have tried most suggestions here; I'm trying to add a github api key. Credentials do not appear in drop-down when configuring git for a pipeline. Very frustrating!

mbvreddy commented 5 years ago

+1.. I have same problem. Not able to see credentials in the dropdown

hiriumi commented 5 years ago

Hmm it's happening to me too.

mshauny commented 5 years ago

This is happening to me as well using the bitbucket plugin and strangely it worked perfectly just yesterday but had to rebuild my server and now its not working.

OrenAshkenazy commented 5 years ago

If it helps anyone I decided to moved from using ssh key to app password with MFA.

pablito85 commented 5 years ago

Its happening to me too.

unlimitedLoop commented 5 years ago

+1, Jenkins version: Jenkins 2.150.1

daniel-pilot commented 5 years ago

+1, Jenkins version: Jenkins 2.150.2

programeriss commented 5 years ago

Solution is to use: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/

kevindelord commented 5 years ago

If you want to use an API Token do not create a new credentials with a secret text but with username/password and use the token as your password !

More information here: https://stackoverflow.com/questions/48330402/secret-text-git-credentials-not-showing-up-in-jenkins-project-source-code-mana

Works for me like a charm πŸ‘

kevindelord commented 5 years ago

Solution for us was to create credentials with username/password but instead of using the actual password of the account, use the api token (and be 2FA ready ;) )

https://stackoverflow.com/questions/48330402/secret-text-git-credentials-not-showing-up-in-jenkins-project-source-code-mana

JaimePata commented 5 years ago

I tried the solution with username/password using the api token but does not work for me. Says credentials are invalid.

tourjee commented 5 years ago

Seems that there's another thread similar to this one. I installed plain-credentials as suggested in this post and it resolved my issue of the API token credential not showing in the drop down.

https://github.com/jenkinsci/gitlab-plugin/issues/388#issuecomment-243751179

jayabalan1992 commented 5 years ago

For me the secret text worked. I was on GitHub Enterprise, which sends the request to the api url https://github.example.com/api/v3?auth_token=xxxxx so you need to generate GitHub personal access token from an admin account or some common account and select right permissions. The issue was with the permissions in my case.

admin:repo_hook - for managing hooks (read, write and delete old ones) repo - to see private repos repo:status - to manipulate commit statuses

argh commented 5 years ago

The top-level system Github configuration does not work for me with username/password credentials.

The top level plugin configuration does indeed work with "secret text" credentials that contain the github access token. Connection tests successfully, shows rate limit, etc.

However, under the "Multibranch Pipeline" project type (and possibly others), the "Branch Sources" / "Github" section does not let me select the global credentials I set.

If I use the Add button and try to create a new "secret text" credential, it creates but doesn't show in the list! (If I navigate to global credentials, there it is...)

If I use the Add button and create a username/password credentials, that works.

So basically in one place, it requires the token, and in the other it requires username+password. What a mess...

java4africa commented 5 years ago

One part of the fix coming soon with https://issues.jenkins-ci.org/browse/JENKINS-46094

jessicamilene commented 5 years ago

I have the same problem, I add a new credential and it doesn't appear on the dropdown.

[SOLUTION] 1ΒΊ - Add -> Jenkins 2ΒΊ - Create a new credential with: Domain: Global Kind: secret text Secret: 3ΒΊ - Click add and use the new credential :)