Eclipse git - unable to clone - git: not authorized error - eclipse

Recently my windows OS was reinstalled.
Before that, in my eclipse, clone was working without any issues. Now with fresh Eclipse, as I try to clone I get the error(attached images). Not sure what is missing.
I tried to add http.sslVerify=false and it is not working out.
In the browser I could see the repository and it is fine.
I also have 'Git' in my machine, through which I'm able to clone the repository! What could be issue when I do this via eclipse?
Issue
More details

In bitbucket 'settings', there is an option called 'app passwords' under 'Access Management'. There I created a password and used that password in eclipse during clone, solved my problem!

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/

RubyMine fails to find github repository

I am testing out RubyMine from JetBrains as a potential new IDE to use for rails development.
I am trying to checkout from version control using github. But when I try to checkout my repository by url (which works on my cloud 9 environment), I get "Clone Failed repository not found".
I have tried the various suggestions on the web like setting SSH executible in the Git settings to "Native".
I have tried using both token and username password in the github settings.
I have tried "clone github repositories using SSH" and combinations of all of these.
Has anyone gotten RubyMine to work with github on a mac?
Thanks.

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

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.

Error 401 Authorization required when pushing to github repository

I've been working with my remote github repository with no problem at all. But since yesterday I'm not able to push to my remote repository anymore.
I work with the eclipse IDE git pluggin and whenever I try to push I am getting this error:
https://github.com/jotaseme/josemaria.moreno.IWVG-doo.miw.upm.es.git:
401 Authorization Required
I've double-checked the user and password and also I've tried with other pc. The same situation: failed pushing to remote repository.
Any suggestion?
Thanks in advance.
Found this gist in one of the eclipse platforms:
In Eclipse
Help -> Install New Software
Work with: http://download.eclipse.org/mpc/releases/1.5.1a
Select the "EPP Marketplace Client"
Proceed with defaults

How do I push to Git Repo given the following error: An internal Exception occurred during push: ssh://git#github.com/xxx/xxx.git: session is down

I recently set up a github account to store the source code of a project I have been working on.
I am using egit eclipse plugin to push changes to github.
I successfully pushed the initial code and 2 subsequent changes. However when I attempted to push the third change I was not able. The following excepiton appears in the eclipse error log.
If someone could tell me the cause of this error, or tell me how I can go about debugging the problem it would be a great help.
org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of push command
at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:156)
at org.eclipse.egit.core.op.PushOperation.run(PushOperation.java:227)
at org.eclipse.egit.ui.internal.push.PushOperationUI.execute(PushOperationUI.java:145)
at org.eclipse.egit.ui.internal.push.PushOperationUI$1.run(PushOperationUI.java:202)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.errors.TransportException: ssh://git#github.com/xxx/xxx.git: session is down
at org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:154)
at org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:118)
at org.eclipse.jgit.transport.JschSession.exec(JschSession.java:91)
at org.eclipse.jgit.transport.TransportGitSsh$SshPushConnection.<init>(TransportGitSsh.java:306)
at org.eclipse.jgit.transport.TransportGitSsh.openPush(TransportGitSsh.java:152)
at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:130)
at org.eclipse.jgit.transport.Transport.push(Transport.java:1120)
at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:152)
... 4 more
Caused by: com.jcraft.jsch.JSchException: session is down
at com.jcraft.jsch.Session.openChannel(Session.java:750)
at org.eclipse.jgit.transport.JschSession$JschProcess.<init>(JschSession.java:147)
... 11 more
I experienced the same issue. Resolution follows:
Delete origin push and fetch in remote(Eclipse view --> Git repositories).
Close Eclipse.
Go to .ssh folder(Users/.ssh) and delete the key files(public and private).
Start eclipse and regenerate the keys(Window --> Preferences --> General tab --> Network connections --> SSH2).
Copy the key and add it to github/SSH Keys
In Eclipse add new remote and push.
Edit
You may not need to delete all the key files. If you have already added a key file previously (perhaps while setting up native Git), you can just add the name of that file in list of keys, and it will work.
This seemed to work for me:
Do everything Firoz and Nishant say except push: https://stackoverflow.com/a/9889350
Create or edit the following file on your desktop:
File : ~/.ssh/config
Content :
Host github.com
User [your_github_username]
Hostname github.com
PreferredAuthentications publickey
IdentityFile [path_to_private_key]
In your Eclipse Git Setup for your project do the following:
URI : git#github.com:[repo_owner_username]/[repo_name].git
Protocol : ssh
Username : git
Password : [leave_blank]
Save and push.
See this GitHub SSH Help page for useful info: http://help.github.com/ssh-issues/
Worked for me after initially suffering through "session is down" and "cannot open git-upload-pack" errors. Hope it helps everyone else too.
Good luck!
I faced the same problem and I found out solution which is extremely foolish.
I took following steps:
I logged into git repository of my project from browser and didn't sign out.
I copied the http url to push or pull from project repository from github.
I pasted the url in my eclipse plugin while pushing code (didn't use the already stored one even though both of them were same)
I don't know what and why but above steps have worked for me whenever I have faced above problem. I don't know why does eclipse throw such exceptions and why does it gets solved this way.
You can also try pushing using other ways outside of eclipse. for eg. `TortoiseGit` or `SmartGit` etc.
I had the same problem. I fixed it by pointing the JAVA_HOME variable to jdk 6. It was originally pointing to jdk 5.
I got this error message and it was fixed when one of my co-workers emailed me the two files id_rsa and id_rsa (MS Pub doc), I put them in C:Users\[userID]\.ssh, and shut down and restarted my IDE.
I had this issue with EGit and solved it at last. Somehow sometimes things get messed up. If you can not solve it through Eclipse just go to your "git" folder with git bash with Windows. With Linux it is even easier: just open the terminal.
This problem occurs because of username, password, and ssh keys getting messed up.
So, use the commands "git remote show origin" and make sure if the origin is username#github.com...... Sometimes Eclipse just puts "git" as a username so make sure you have the correct user name by changing it with the command git remote set-url origin https://usrname#github.com/restofthe url. It should automatically change the configurations in eclipse.
Best...
I also had this issue.
The following command in Git Bash, comes handy in such scenarios: git remote prune origin
This configured the Pull/Push in the corrupted branch.