Reputation: 962
I've just created a local clone successfully (using my credentials), but when I try doing "Pull" I get an error message: (changed repos address manually to an abstract one)
http:_//username@url:port/git/proj/team_repos.git: not authorized
org.eclipse.jgit.api.errors.TransportException
This is more detailed from the log:
java.version=1.7.0_10 java.vendor=Oracle Corporation BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_SG Framework arguments: -vm /usr/java/jdk1.7.0_10/jre/bin Command-line arguments: -os linux -ws gtk -arch x86_64 -vm /usr/java/jdk1.7.0_10/jre/bin
Error Sun Apr 14 19:00:11 IDT 2013 http_://username@url:port/git/proj/team_repos.git: not authorized
org.eclipse.jgit.api.errors.TransportException: http_://username@url:port/git/proj/team_repos.git: not authorized at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:137) at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:245) at org.eclipse.egit.core.op.PullOperation$1.run(PullOperation.java:90) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2326) at org.eclipse.egit.core.op.PullOperation.execute(PullOperation.java:121) at org.eclipse.egit.ui.internal.pull.PullOperationUI.execute(PullOperationUI.java:115) at org.eclipse.egit.ui.internal.pull.PullOperationUI$1.run(PullOperationUI.java:90) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) Caused by: org.eclipse.jgit.errors.TransportException: http_://username@url:port/git/proj/team_repos.git: not authorized at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:476) at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:305) at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136) at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122) at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1104) at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:128) ... 8 more
Didn't find any solution for that.. Anyone?
Upvotes: 11
Views: 38012
Reputation: 68
org.eclipse.jgit.api.errors.TransportException: <repo_path>: not authorized
One of the reason you will get the above error while communicating with the remote repo if your 2FA is enabled. In that case you need to create your personal access token
GitHub -> Go to profile -> developer settings -> Personal Access Token -> Generate one (copy the token, as it will be available for you only right now) -> (optional) Enable SSO -> Authorize (if the repo is linked with an organization)
That's it! Use the copied PAT in place of password
for cloning repos. That should take you through.
Upvotes: 2
Reputation: 39
Just login to your Bitbucket account and then try to take pull. This may clear this exception.
Upvotes: 0
Reputation: 962
I managed to solve it.
In Eclipse, go to:
Git Repository Exploring (Perspective) --> Your git repository clone --> Remotes
Find the URLs for fetch & push.
Right click each one --> Clear Credentials
.
Now try to push / pull, and enter your password manually, unmarking the "Store in Secure Store" option.
After a lot of searching this seems to solve it: https://bugs.eclipse.org/bugs/show_bug.cgi?id=356233
Upvotes: 26