Eclipse, Git and Bitbucket - Can't push - Error 401 Unauthorized - eclipse

I have a problem with Bitbucket and EGit. I created a new repository on BitBucket and also a new project in Eclipse. When I try to push a commit, I get the following error message:
Can't connect to any repository: https://bitbucket.org/MyName/MyProject.git
(https://bitbucket.org/MyName/MyProject.git: 401 Unauthorized)
I also tried https://MyName#bitbucket.org/MyName/MyProject.git but I got the same error. After creating the commit, I pushed by using the command line with git push and it worked without a problem. After that I tried pushing with Eclipse and EGit but I got the same error again. I checked my account name and password multiple times.
Do I need to configure EGit in some way to make it possible to push from Eclipse to BitBucket? A month ago I always pushed to a repository on a different host from Eclipse with EGit without a problem.

It depends on your version of Eclipse and Egit.
With the very latest Neon, there is a thread reporting the same issue, and a ticket opened: bug 501000.
There is a fix in progress: Change 82187: "EGit Authenticator prevents login dialog".
It is already merged into master (also on the GitHub mirror:commit 39b391c and commit 10c65c7.
Change 82539 also just got merged 3 days ago.
So Marketplace Client Project project repository 1.5.2 should include the fix.
Actually, it is called 1.5.1a, but you can use http://download.eclipse.org/mpc/releases/1.5.2. as an url.
If you are using Eclipse Neon you may also install EPP Marketplace Client from the Neon repository. Click Help > Install New Software, type "neon", select the Neon repository URL, select Collaboration > Eclipse EPP Marketplace Client and click Install.
There is also a fix in progress for EGit itself: change 82295.

Related

Team Foundation Server - Eclipse and Cross Platform: Unable to clone Git repository using TEE in Eclipse. Error cloning - Not Authorized

I have TFS 2018.2 and Eclipse IDE for Enterprise Java Developers Version 2019-06 (4.12.0). In eclipse I have installed Team Explorer Everywhere plugin and I am able to see all my Git repository however when I try to clone a git repository using the administrator account in TFS I get below error:
Error cloning the <GitName> repository.
http://../..//<GitName>: not authorized.
Clone Error:
Eclipse Version:
Reference Document
In case if the question is placed in the wrong forum path feel free to correct it.
I have tried the resolution provided in https://github.com/microsoft/team-explorer-everywhere#frequently-asked-questions-faq
Also, tried installing latest versions of Egit in Eclipse - https://download.eclipse.org/egit/updates/
I am not sure how to use the older version of Egit to try the import of repository. I seem to have latest version of Egit.
UPDATE:
Apparently I am able to resolve the issue by following below steps:
And creating a Git repository from File menu and then utilizing the 'Copy clone URL' from the first image. Select the newly created repository and perform right click on it to select 'Paste repository path or url' which would ask for authentication and repo would be copied.
However the action items have carried TFS to run into issues:
and
According to your description, I'm afraid you are in the wrong direction to fix this issue.
Your error actually is "not authorized" which is not Authentication not supported. There are totally different issues. Instead of digging into that QA, you should try to figure out why it's not authorized for MyGit repository.
First give a try to use Eclipse with version 4.2 to 4.6 instead of latest according to official link of team-explorer-everywhere.
Supported on Linux, Mac OS X, and Windows. Compatible with IDEs that
are based on Eclipse 4.2 to 4.6.
Besides follow below steps to narrow down the issue:
You should also use git command line by using the administrator
account in TFS and check if you are able to use it to connect/clone
MyGit repository which hosted by TFS server.
Check if your Eclipse can connect to and clone library from any
GitHub repo correctly.
Update or delete cached credentials from Control Panel ->
Credential Manager -> Generic Credentials the password for
git:http://ServerName:xx/

TFS-Git - An exception occurred during push on URI: 401 Unauthorized

I'm getting an error while pushing the git project to master on Eclipse. I am using Eclipse Neon.1 and trying to connect to TFS-Git repository. I am able to push and pull from the same repo using cli tools but eclipse troubles me. Here is the error message
An exception occurred during push on URI
https://tfs.[mydomain].com/tfs/Test_Collection_Report/_git/TFS_GIT_Training:
https://tfs.[mydomain].com/tfs/Test_Collection_Report/_git/TFS_GIT_Training:
401 Unauthorized
Using the Team Explorer plugin for Eclipse, I am able to connect to the repository. I have followed the fix mentioned here, but no luck yet. Any idea whats blocking me from pusing to git through eclipse? Here are my guess,
Windows git and EGit conflict
Eclipse not considering my credentials while connecting to git.
Any suggestion on how to fix it?

How to clone from Bitbucket on Eclipse behind an auth proxy

I'm having problems to clone a git repository from bitbucket on eclipse, the fact is that I can clone from other sites like github, but not from bitbucket. The auth proxy on my company allows me to go out only with http and https, so I cannot use ssh.
The url I am using to clone in eclipse is: https://mybituser#bitbucket.org/mybituser/test-bitbucket.git
I have eclipse configured to work behind the auth proxy, Window->Preferences->General->Network Connections.
I've tested this on eclipse kepler and juno and shows the same error.
When I try to clone from bitbucket, I complete the wizard until the last step(view branches, selecting destination folder, etc) but when I hit finish appears the error dialog:
https://bitbucket.org/mybituser/test-bitbucket.git: cannot open git-upload-pack
Anyone knows what can be happening here?
Thank you,

Checkout a GitHub project to Eclipse

I need to checkout on my Eclipse Workspace an existing project hosted on GitHub. I have the project URL, and I already installed Egit and Mylyn. But I don't know what the next step is. Could you help me?
If you already have mylyn and egit, then you may also want to install the github connector. Afterwards you can directly import a github repository just giving the name (see the second screenshot of the link).

How do you successfully use Egit with GitHub?

There seems to be no guide out there that is still valid so I'm asking how to use Egit in Eclipse to push a project to GitHub. I followed some guides but end up with an "Specifications don't match any existing refs in source repository." error in the push dialog.
I'm using Eclipse 3.6.1 and Egit 0.9.1. It should be possible to use Egit shouldn't it? it would be great if you could give a short step by step guide to push a project with Egit successfully.
you should commit the project first onto local repository.
and then select Team->Remote->Push... to push the project onto Github.