GitCloneFailedException: git-upload-pack not permitted

3,253 views
Skip to first unread message

Jungho Ahn

unread,
Apr 18, 2017, 4:56:17 AM4/18/17
to Repo and Gerrit Discussion
Hello,

I'm trying to integrate Gerrit 2.13.7 with a Github Enterprise.
But while I tried to import a repo, I got the following error:

com.googlesource.gerrit.plugins.github.git.GitCloneFailedException: Failed to clone from repository https://user...@github.corp.net/myrepo.git
        at com.googlesource.gerrit.plugins.github.git.GitCloneStep.doImport(GitCloneStep.java:89)
        at com.googlesource.gerrit.plugins.github.git.GitImportJob.run(GitImportJob.java:48)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at com.google.gerrit.server.util.RequestScopePropagator$5.call(RequestScopePropagator.java:221)
        at com.google.gerrit.server.util.RequestScopePropagator$4.call(RequestScopePropagator.java:200)
        at com.google.inject.servlet.ServletScopes$4.call(ServletScopes.java:450)
        at com.google.gerrit.server.util.RequestScopePropagator$1.call(RequestScopePropagator.java:99)
        at com.google.gerrit.server.util.RequestScopePropagator$3.run(RequestScopePropagator.java:163)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.eclipse.jgit.api.errors.TransportException: https://user...@github.corp.net/myrepo.git: git-upload-pack not permitted
        at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:135)
        at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:203)
        at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:136)
        at com.googlesource.gerrit.plugins.github.git.GitCloneStep.doImport(GitCloneStep.java:87)
        ... 14 more
Caused by: org.eclipse.jgit.errors.TransportException: https://user...@github.corp.net/myrepo.git: git-upload-pack not permitted


I added some debug messages and I verified password (access token) was correctly set in the repo's credentials provider,
but any of CredentialsProvider's method (like supports() or gets()) was not called.

When I tried to run "git clone https://username:<access-token>@github.corp.net/myrepo.git", it worked.

Should I do something special to integrate with Github Enterprise? When I tried with github.com, it worked well.

Thanks,

Jungho Ahn

unread,
Apr 18, 2017, 1:57:20 PM4/18/17
to Repo and Gerrit Discussion
I tried to hack the plugin to use " https://username:<access-token>@github.corp.net/myrepo.git" as a clone url, but I got the same error.
When I try to use 'git clone' command, it works fine.
Is there any difference in jgit authentication?
Reply all
Reply to author
Forward
0 new messages