GitHub access using access token and Basic Authentication no longer working

53 views
Skip to first unread message

Chris Jansen

unread,
Apr 11, 2014, 2:16:30 PM4/11/14
to jenkins...@googlegroups.com

Hi,

I have been using a GitHub personal access token and basic authentication to pull from private GitHub repos from Jenkins. I use the GitHub Plugin, and then for each project, the GitHub Project and Git Repository URL settings are the same, with a format of: https://<user>:<access_token>@github.com/<account>/<repo>/.

This has been working fine for months, until this past Wednesday. Now whenever I build I get an 'Invalid username or password' error (see below).

I recreated the GitHub access token, which didn't fix the problem. I'm think the issue is on the Jenkins side, since I can use the same URL on the command-line to clone the repo, and it works fine.

I upgraded Jenkins to 1.558, but then reverted back to 1.555, thinking the upgrade could have caused the problem. I'm still stuck without being able to pull from GitHub though.

Started by user anonymous
Building on master in workspace c:\build\ProjectA
Fetching changes from the remote Git repository
Fetching upstream changes from https://us...@github.com/account/repo/
FATAL: Failed to fetch from https://us...@github.com/account/repo/
hudson.plugins.git.GitException: Failed to fetch from https://us...@github.com/account/repo/
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:623)
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:855)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:880)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1414)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:671)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:580)
    at hudson.model.Run.execute(Run.java:1676)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:231)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://us...@github.com/account/repo/ +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: remote: Invalid username or password.
fatal: Authentication failed for 'https://us...@github.com/account/repo/'

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1276)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1146)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$200(CliGitAPIImpl.java:87)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:254)
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:621)
    ... 10 more

Reply all
Reply to author
Forward
0 new messages