Working with openShift in Eclipse Error at importing - eclipse

I've followed this tutorial here , but on step Clone your repo, by clicking finish, I got this error:
Could not clone the repository. Authentication failed.
Please make sure that you added your private key to the ssh preferences.
What's the problem?

It's a problem with your SSH keys.
Usually, the problems are:
Your private key is not in the correct location;
You didn't register your public key correctly in the repository (wrong key or wrongly formatted);
If you are using windows, you can try to put your private key in either of the following locations, where your git is installed:
Program Files\Git\.ssh\id_rsa
Program Files (x86)\Git\.ssh\id_rsa
Or create a .ssh directory in your home directory and putting the private key there (usually, it's C:/Users/user/).
If it doesn't work, give more information about your environment.

You should use the final version of Jboss Tools but not beta versions when you install the openshift tool plugin for eclipse. And I don't recommand you to install it via eclipse marketplace because Jboss tools final version doesn't appear when you make a search on it, especially if you use STS. The link for final version of Jboss tools is here http://tools.jboss.org/downloads/

Related

Suddenly getting "No more authentication methods available" from eclipse egit from formerly working installation

I've had Eclipse installed for quite a while. I upgraded to 2018-12 a few weeks ago. I've had ssh authentication set up for all my git repos (centrally stored in BitBucket Server) for a long time. It's been working perfectly fine.
Today I had to reboot my Windows7 laptop for some automated installations, which happens a few times a month.
I restarted Eclipse and suddenly I'm finding that all of my git repos are failing authentication. I'm seeing this in the log:
!MESSAGE ssh://git#.../....git: No more authentication methods available
!STACK 0
org.eclipse.jgit.api.errors.TransportException: ssh://git#.../.....git: No more authentication methods available
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:254)
at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:290)
at org.eclipse.egit.core.op.PullOperation$PullJob.run(PullOperation.java:256)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.eclipse.jgit.errors.TransportException: ssh://git#.../.....git: No more authentication methods available
at org.eclipse.jgit.transport.sshd.SshdSessionFactory.getSession(SshdSessionFactory.java:249)
I then went to one of my local repositories in my Cygwin shell and tried a "git pull". This worked perfectly fine.
The only recent change I made that might be related to this is that I installed the Windows version of git, in addition to the Cygwin git. I put it at the end of the PATH. I don't see how that could be affecting this, as Eclipse is using jgit.
Update:
I think I just solved the problem, but I'm not sure what the real problem was.
When I installed 2018-12 a few weeks ago, I thought I noticed a mention of upcoming changes to what the default ssh client would be. I noticed that I was currently set to use JSch, and I thought the release notes said that it would be moving to "Apache MINA", so I decided to change it now and see how it worked. This was working fine for a couple of weeks.
Just now I tried changing that field back to "JSch" and then doing a pull. It worked fine. Just to be sure, I changed it back to "Apache MINA" and tried it again. Still failed. Changed it back to "JSch" and it's working.
I don't know what's going on here.
This is happened to me today... I don't have any clue why it's happening.. I tried removing eclipse and installed again... same problem again... I checked all the settings and everything seemed fine... the error message was not something to guess easily...
What i have done
My ssh keys are not the default one... I have a folders called github, internal and deployed inside ~/.ssh
So, In eclipse I went to Window > Prefrences -> Network -> SSH2 in private keys I have given the path to my keys... but i didn't change SSH2 home directory... this is the culprit.. I will tell you later why
SSH2 Home directory = ~/.ssh
path to private key = ~/.ssh/github/slokesh
I changed ssh client in Preferences -> Team -> git but every single time the same error was showing up...
So, then I went back to step 2, then there I changed SSH2 home directory to ~/.ssh/github and the path to private key to slokesh then it worked...
I hope this helps... if anything is unclear please leave a comment...
I feel that the error message they are throwing could be more verbose and clear. Also, there should be a note in the SSH2 home and private key path fields because the private key path they are taking as relative to SSH2 home. But unfortunately they are not giving...

Eclipse and EGit: Can't export SSH

I tried to set up a ssh connection in order to be able to pull git repositories with EGit in Eclipse via ssh. (I'm using Eclipse Luna).
For this I used instructions given on the Eclipse Wiki.
I went to Eclipse --> Windows --> Preferences --> General --> Network Connection --> SSH2 --> Key Management --> Generate RSA Key
and tried to export the key via the "Export via SFTP" Button. I entered
githubID#git.eclipse.org but instead of exporting my key, an error appeared on top of the window ("failed to export ssh key to remote server")
I did the whole process a few month ago (that worked) and only wanted to redo this, because pulling my repository caused an error.
Old pull Error:
ssh://githubID#git.eclipse.org/gitroot/myproject.git: Session.connect: java.io.IOException: End of IO Stream Read
I have read about an update of EGit and updated it as well as trying the whole process on a new laptop, but the error also occurs in the new laptop with a new Eclipse.
Does anybody knows a solution for my problem? Thank you in advance!
Finally I ended up asking the Eclipse Webmaster for help.
As my IP address hasn't been blocked (This might have been a solution!) I tried to use the Git Bash instead of EGit and that's worked! So it wasn't a problem with my ssh key, but with the Client, which seems to be broken.
It's more work to do all git commands manually, but finally it works.
It seems to be a bug in older versions of eGit.
Related: https://www.eclipse.org/forums/index.php/t/1096174/
However, the most recent versions of eGit are not compatible with Eclipse Luna any more.
For me, upgrading eGit to version 5.0.3, the last version compatible with Eclipse Luna by manually downloading eGit from here http://archive.eclipse.org/egit/updates-5.0.3/ and installing it from local solved the problem.

Cannot make egit work with a server via ssh

Running the Mars version of Eclipse on Windows 10. I'm trying to clone a repository with this URL (domain name replaced with example.com):
ssh://git#git.example.com/opt/git/dnsconfig.git
Initially I had a lot of trouble trying to connect, because Eclipse did not have the server fingerprint in known_hosts, and had no way to accept the unknown fingerprint. I eventually figured out a way around that (copy the line from a Linux server's known_hosts file to the eclipse known_hosts on Windows). The public key matching the private key in eclipse has been added to the authorized_keys file on the server.
Now that I have solved the fingerprint problem, when I try the clone, I get to the Branch Selection screen and this is the error message at the top:
ssh://git#git.example.com/opt/git/dnsconfig.git: not found.:
ssh://git#git.example.com/opt/git/dnsconfig.git: not found.
If I go to a Linux machine and type the following command (this host is also set up with an ssh key in authorized_keys on the server), it works perfectly:
git clone ssh://git#git.example.com/opt/git/dnsconfig.git
I set up the server using this as a guide:
https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server
This is probably user error ... can anyone help me figure out what I've done wrong?
After I tried msysgit, the note from MichaƂ Grzejszcza talking about Putty led me to try one more thing.
I do use putty quite frequently, and I have a key that I keep loaded in pageant, which I use to log into personal accounts on several servers.
I was not using that personal key for eclipse, I wanted to use a completely separate key for git.
When I added the matching public key for my personal key to the git user's authorized_keys file on the git server, suddenly both eclipse and msysgit were working fine, which means that both of them are tied into putty. This was a little surprising for msysgit, since the info I have on msysgit says that it comes with and uses openssh.

'cannot open git-upload-pack' error in Eclipse when cloning or pushing git repository

I am not able to clone or push to a git repository at Bitbucket in Eclipse:
It's weird, because a day before I didn't have any problem. I have downloaded the sts 3 times with no luck. This error keeps showing. Also I have installed SourceTree and it says 'This is not a valid source path / URL':
If I use git commands to import the project, it works, but I wan't to use EGit for this task, since I am a newbie with git.
I don't know if this has to do with it, but in the same directory I have the android-adt-bundle. This one works pretty well, but the project lies on GitHub and not Bitbucket. Also, I'm working with another person and he is able to fetch and push data from and to the Bitbucket repository. I have read lots of posts but none of them have helped me out.
I'm using Windows 7 btw.
Might also be bad SSL cert, fix the server
If you have a GIT server with an outdated or self-signed SSL cert fix the server, afterwards everything should run fine.
Insecure Hotfix: Let the client accept any certificate
The following solution is just a mere hotfix on client side and should be avoided as it compromises security of your credentials and content. There is a detailed explanation for this in "How can I make git accept a self signed certificate?" which offers more complex and more secure solutions you can try out if the following works in general.
In my case it was Eclipse using a different storage for the git config as the command line does and thus not having the option
git config http.sslVerify false
set (which I set using command line for the repo for working with invalid/untrusted SSL cert).
Adding the option insides Eclipse immediately resolves the issue. To add the option
open preferences via application menu Window => Preferences (or on OSX Eclipse => Settings).
Navigate to Team => Git => Configuration
click Add entry..., then put http.sslVerify in the key box and false in the value box.
Seems to be a valid solution for Eclipse 4.4 (Luna), 4.5.x (Mars) and 4.6.x (Neon) on different Operating systems.
It happens due to the following Reasons:
1) Firewall.
2) Network Issues.
3) Proxy Settings Mismatch
4) Connected through different Router - which is not authorized within the network.
5) Git Proxy Authentication Details
Finally I made it work thanks to the steps outlined in the Eclipse forum:
Set up the SSH key stuff
Download and install mysys git according to the github instructions at http://help.github.com/win-git-installation/
In C:/Users/you/ssh hide any existing keys (id_rsa and id_rsa.pub) in a subdirectory. If the ssh directory does not exist, create it. Of course, "you" is your username as the OS knows you.
From the start menu, run Git-Bash command shell (a regular DOS command shell will not work).
In the Git-Bash shell generate an rsa key based on your email (the one you registered at github):
ssh-keygen -t rsa -C "you#wherever.com"
and enter your pass phrase and confirm when asked.
The previous step should have created C:/User/you/ssh/id_rsa.pub which you can now open in a text editor and copy. At github, go to account settings, SSH Keys, add a key and paste this in the key box.
In Git-Bash again (notice the back-ticks in the next line):
eval `ssh-agent`
ssh-add C:/User/you/ssh/id_rsa
ssh git#github.com
Here is what you just did: You ran the ssh-agent which is needed by ssh-add. Then you used ssh-add to make note of the location of your key. Then you tried to ssh to GitHub. The response to this last command should be that you have successfully authenticated at GitHub but that you don't have shell access. This is just an authentication test. If the authentication was not successful, you'll have to sort that out. Try the verbose version:
ssh -v git#github.com
Assuming this worked....
In Eclipse, configure the remote push
Window > Show View > Git > Git Repositories will add a repository explorer window.
In the repository window, select the repository and expand and right-click Remotes and choose Create Remote.
Copy the GitHub repository URI from the GitHub repository page and paste it in the URI box.
Select ssh as the protocol but then go back to the URI box and add "git+" at the beginning so it looks like this:
git+ssh://git#github.com/UserName/ProjectName.git
In the Repository Path box, remove the leading slash
Hit Next and cross your fingers. If your get "auth fail", restart Eclipse and try step 5 again.
When you get past the authentication, in the next dialog select "master" for source ref, click "Add all branches spec" and "Finish".
Instead of using SSH git#github.com I did it with SSH git#bitbucket.org.
Now I can push and import without any problem.
After struggling for a couple of hours, I found that git config file was not updated when I added the entry sslVerify = false in my Eclipse.
I solved my problem by navigating to my .git directory and updating the config file to :
[http]
sslVerify = false
I added -Dhttps.protocols=TLSv1.1,TLSv1.2 to eclipse.ini and it's working.
I use java 1.7
I had exactly the same issue with eclipse 2020-12. In Preferences->Git I changed "Http Client" to "Java built-in HTTP" and the issue is resolved.
One cause of this is having Fiddler2 configured to decrypt HTTPS traffic. Close Fiddler2 and it should work fine.
This issue can be caused when you have a local firewall which is preventing your application from being able to send any network traffic away from your machine. I.e. Outbound traffic or egress traffic rules.
Please try disabling your firewall for a quick test to see if this fixes your issue. If it does then setup the appropriate firewall policy for the application you are trying to use to push or pull to a git repository.
Recently I got same problem with existing repository.when I try to fetch from upstream not able Fetched object and got problems eclipse: cannot open git-upload-pack.
for me following solution work after adding TLS version in eclipse.ini file
Dhttps.protocols=TLSv1.1,TLSv1.2
For java7 need to add TLSv1.1 and for java8 need to TLSv1.2
Note: Need to restart eclipse once above configuration added.
In my case, it turned out that global proxy settings in "Preferences->Network connections" were interfering with git. Which is kind of confusing, because git has dedicated property for proxy configuration. Anyway, I've added repository host to "Proxy bypass" list and the problem was gone.
I faced "git-upload-pack not permitted" error in STS4 while fetching Bitbucket repository. I struggled for many many hours only to realize we need to use password generated with "Create app password" in Bitbucket (and not our own set password)
URL to generate password: https://bitbucket.org/account/settings/app-passwords/new
Use this password in "Clone a Git repository" in STS4
I just got this same error, "cannot open git-upload-pack", in Eclipse with a BitBucket repo trying to do a pull or a push.
I resolved it by switching local branches (Team/Switch To) to the master branch and doing a pull, and then switching back to the branch I was working on and pulling again.
I'm using Eclipse Kepler SR2 on Ubuntu 12.04LTS and was trying to access an internal GitHub using HTTPS.
Unfortunately, my underlying JVM with which Eclipse was started experienced problems with the self-signed certificate of the server. Switching to a different JVM for Eclipse got the HTTPS connection to our GitHub working.
Create a simple Eclipse starter that uses a different JDK, e.g. with OpenJDK:
/Eclipse_Kepler_4.4.2/eclipse -vm /usr/lib/jvm/java-6-openjdk-i386/jre/bin
I got the similar problem. I just followed the below steps
1. Team > Remote > Configure Fetch from upstream...
2. Provide the https: bit bucket uri then Save and Fetch.
3. Reset the latest commit in your project. Team > Reset > Select the latest commit from remote folder
4. Then synchronize the workspace. Team > Synchronize (in synchronize perspective)
5. Right click on project and overwrite the local copy.
6. Click on Pull icon.
The Solution to this in Eclipse Mars 4.5.2:
Window -> Preferences -> Team -> Git -> Repository Settings -> AddEntry
Key: http.sslVerify
Value: false
For those who still have this problem, and none of the above solutions worked for you:
Update your versions of java and Eclipse.
In my case, I updated from java 7 to java 9, and Eclipse Mars to Eclipse Oxygen, and this problem was solved !!!
Add https.sslVerify as false...when you use https connection for importing from git
I had a similar problem and a quick fix to your issue is to make sure that you set your JVM option in the eclipse.ini file to use jre7. Older Jre's come with an old local policy file and this will return errors. One quick note also is that you need to point to your javaw not java.
-vm
c:\PROGRA~2\Java\jre745\bin\javaw.exe
-vmargs
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m
-Dsun.lang.ClassLoader.allowArraySyntax=true
I had my proxy settings set up in Eclipse and wasn't connected via ssh, which was causing the error.
i've tried all those methods but it didn't work then a workmate told me that Putty Key Generator used to generate keys with 1024 bits but now Putty generate 2048 bits keys by default , so you just need to change the "Number of bits in a generated key" and it should work.
The problem can also be caused by wrong system time (by a couple of years), making the Git's certificate invalid.
I just changed the Network settings from Native to Manual, restart and the error is gone.
I'm using RAD 8.0.4.3 with and old version of EGit connected to TFS/Git. ;-)
I got this error message because I had a different user than what the repo expected in my git config.
This would obviously trigger the SSL Cert failures mentioned above.
Fixing to the correct user resolved this issue for me.
to fix SSL issue you can also try doing this.
Download the NetworkSolutionsDVServerCA2.crt from the bitbucket server and add it to the ca-bundle.crt
ca-bundle.crt needs to be copied from the git install directory and copied to your home directory
cp -r git/mingw64/ssl/certs/ca-bundle.crt ~/
then do this. this worked for me
cat NetworkSolutionsDVServerCA2.crt >> ca-bundle.crt
git config --global http.sslCAInfo ~/ca-bundle.crt
git config --global http.sslverify true
I finally solved this issue by disabling IPv6 on the network configuration
Screenshot of my network configuration
Note that I use a VPN connection. If you do too, you must restart it.
I'm pretty sure that it will work even if you don't use a VPN.
The repository owner should give you a contributor permission:
For the Eclipse running on IBM JDK the following 2 lines are mandatory in eclipse.ini after -vmargs:
-Dhttps.protocols=TLSv1.1,TLSv1.2
-Dcom.ibm.jsse2.overrideDefaultTLS=true
i've had the same issue on Spring Tool Suite (STS) and turns out, all i had to do was update my proxy settings in STS network config.
window > preferences > General > Network Connections and on the dropdown select "Manual" from "Native".
Here, just add your proxy url, port and your credentials for http and https by clicking on edit.
Apply and close.
Hope it works for you.
I got this error and after some research found that we need to create an access token in github and use it instead of the password which we have been using till now while git push and pull.
Github developer blog explaining the password deprecation: https://developer.github.com/changes/2020-02-14-deprecating-password-auth/
I have documented the steps here - you may try it out and see if it works for you.
https://webfuse.in/blogs/issues-troubleshooting/git-upload-pack-not-permitted-on-error-while-git-pull-and-git-push/
Thanks. This looks like an evergreen Question as I am answering after 7 years along with other valid answers!! :)
I had the same error. The error occurred suddenly while working. In my case it looked like an account problem or server side problem.
I sign out and signed in again in Bitbucket repository from web browser and this solved my problem.

Subclipse + SVNKit keeps asking for credentials when connecting through svn+ssh

I'm using Subclipse to connect to an SVN repository via svn+ssh and a private key (the server has the paired public key). The interface is SVNKit (Pure Java). After I enter the svn+ssh://repository... address I am prompted for credentials. I specify the username and private key file (I did not set a passphrase so it is left blank) and confirm. The window pops up again and this goes on indefinitely. No console message is provided.
Note 1: Marking "Save information" seems to have no effect. If there is a cache I'm supposed to be deleting this could help. I already deleted the keyring file in eclipse.
Note 2: I wasn't sure if the private key should be in SSH2 or OpenSSH formats, but I tried both and there is no difference.
Note 3: I cannot find org.tmatesoft.svn folder under plugins in eclipse. I installed SVNKit from the eclipse update site http://eclipse.svnkit.com/1.7.x.
Specifications:
Windows 7 64 bit,
eclipse 4.2.1 64 bit,
Subclipse 1.8.16,
Subversion client adapter 1.8.3,
SVNKit client adapter 1.7.5.1.
If there is any other information or log file I should provide I would be happy to do so.
I had a similar problem and figured out that I tried to use the private key generated by puttygen, but SVNKit needs an OpenSSH key.
My solution was:
Start PuTTY Key Generator
Load private key
Conversions \Export OpenSSH key
Select openSSH Key in Eclipse
Eventually it turned out that there was a problem with they key. It was encrypted with DSA instead of RSA and the server wasn't set up for it.
Why I got no message about a bad key pair is beyond me, but with a correct key it worked.
1-
under Window => Preferences SVN (or team => svn depending on your version), make sure you selected a library available in yourSystem... for example SVNKIT(Pure Java) .... instead of JAvaHL... which often missing
2-
under Window => Preferences, search for "Secure Storage" and setup a master password (usually clicking on Change Passowrd...). This isn't your svn password but for some reasons i ignore, if this master password is not set, Eclipse won't be able to store and retrieve your svn password when you click the save password..
I fixed this by generating a SSH key in PEM format
ssh-keygen -m pem
You can enable SVNKIT logging by creating a .options file in the eclipse home directory. The file should contain the following text:
org.tmatesoft.svnkit/debug=true
org.tmatesoft.svnkit/debug/error=true
org.tmatesoft.svnkit/debug/warning=true
org.tmatesoft.svnkit/debug/info=true
org.tmatesoft.svnkit/debug/fine=true
org.tmatesoft.svnkit/debug/trace=true
Then run eclipse with the -debug command line argument
I would not worry about Note 3. If you open Eclipse Preferences and go to Team > SVN and you can select SVNKit, then it is installed and available. On my system, it is a JAR in the plugins folder.
SVNKit is in charge of the SSH process, so you could visit their forums and email support#svnkit.com for information and ideas.
My recollection is that they normally cache the information for the duration of the Eclipse session, so not sure what is going on. If you keep responding to all the prompts does everything work? If not, then maybe you are being prompted because it cannot successfully use your credentials?
They have a Troubleshooting section in their wiki: http://wiki.svnkit.com/Troubleshooting