ZEE
ZEE

Reputation: 5849

Jenkins GitHub plugin can't choose my credentials

I got very strange behavior that has never happened before, when I try to configure the GitHub server in Jenkins general configuration to set up webhooks auto.

The drop down menu doesn't display my registered credentials. I was always be able to do that, but suddenly I don't know what's happening. I tried to uninstall the plugin, restarting Jenkins, kill the Jenkins Docker container and configure all the stuff again ... still I got the same issue.

Enter image description here

There is no other option other than none, and when I add new credentials I still get None as the only option...

Upvotes: 34

Views: 22060

Answers (2)

uNople
uNople

Reputation: 554

In the current version of jenkins (2.462.1), I had been trying to add the credentials as a secret text (with my personal access token as the secret), but it needed to be username/password, with my git username, and the personal access token as the password.

As soon as I did that, the dropdown let me select the credential.

Upvotes: 0

Hilborn
Hilborn

Reputation: 754

The issue is that the GitHub plugin only accepts plain text credentials.

The GitHub access token can be created manually, or automatically via the Advanced... options as described here.

In case you already have an access token in GitHub (you'll get an error in Jenkins), you can remove it in Github. Then you can let Jenkins generate the token and select it in the Credentials menu.

Upvotes: 20

Related Questions