Unable to clone git repository in Eclipse using https and SSH links - eclipse

While trying to clone a Git repository in Eclipse Luna, I'm getting the error shown below using the https link:
I added the said values in the Git configuration using this link - "SSL host could not be verified" error but I'm still getting the same error.
I'm sure that the URL is correct. Not too sure if there's something wrong with proxy settings (I don't think so).
On the other hand, I tried the ssh link by generating keys and putting them into the enterprise gitlab account and also on the pc (windows) but I'm still being unsuccessful doing that and getting the same error shown in the image below except for the last point.
I checked the error log, while using the https link it says 'not authorized' and 'Auth fail' when I try to use the ssh link.
I'm listed as the member of the repository and I'm using my email and password of the enterprise account to access it, but no luck.
Help much appreciated. Thank you.

First, if you are using a private GitHub Enterprise in an enterprise, SSH URLS are rarely allowed.
For HTTPS URLs, you need to make sure your proxy configuration ignore host setting in Eclipse includes the domain name of the GitHub Enterprise (on premise) private server, or it will try to contact the proxy every time (and fail)

I have face same problem. To resolve this problem make sure your repository access level is public. It will solve this issue.

Assuming that your company uses their own certificate authority, their root certificate has most probably been added to your computer's trust store. However, Java by default uses its own trust store, so Eclipse does not know about it.
The best solution is to make Eclipse use the system trust store. See this answer for Windows or this answer for macOS.

Related

Authentication not supported error while pushing project to remote TFS server

I am trying to push my code from Eclipse to git in my organisation TFS(Team Foundation Server).
I have followed the link https://www.visualstudio.com/en-us/docs/git/share-your-code-in-git-eclipse to push the code.
But while pushing the branch to tfs server I am getting error.
org.eclipse.jgit.errors.TransportException: http://***.*******.*******.***:****/tfs/****/****/**********/***/********: authentication not supported
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:488)
at org.eclipse.jgit.transport.TransportHttp.openPush(TransportHttp.java:387)
at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:154)
at org.eclipse.jgit.transport.Transport.push(Transport.java:1200)
at org.eclipse.egit.core.op.PushOperation.run(PushOperation.java:197)
at org.eclipse.egit.ui.internal.push.ConfirmationPage$2.run(ConfirmationPage.java:209)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
I have tried various ways to find a perfect solution but till now I have not found any. Can anyone help me with this.
Also would like to highlight the tfs remote repository already has a readme.md file, would that cause any issue while pushing the code. If yes can anyone provide a viable solution.
Note :- I need the solution which I can use in Eclipse to solve this issue.
The possible solutions to your problem are explained in the FAQ:
the reason is that NTLM authentication is not supported by the JGit plugin of Eclipse, which is used indirectly by Team Explorer Everywhere (aka TEE) by means of EGit.
Possible solutions with TFS 2015 RTM and up:
enable HTTP Basic Authentication on TFS (within IIS); this is a server side change;
use CNTLM to overcome the limitation of JGit and use properly the NTLM authentication; this is a client side modification you could do on your Eclipse installation;
enable Kerberos authentication in IIS on your TFS server, as explained in the above mentioned FAQ as well; this is already the default on TFS 2017+.
With TFS 2017 RTW and up you could create a Personal Access Token with scope at least Code (read and write), then you could use it instead of your password in the Eclipse EGit configuration.
Install TortoiseGit, do Pull... and Push.... Try again in Eclipse. Worked for me.

Cannot connect to SonarQube from Eclipse

I'm trying to connect my Eclipse IDE to my company's sonar server instance, but I can't figure out why it doesn't work.
When I access the server (https://mycompany.com/sonar, for example purposes) through the browser, it works perfectly. In Eclipse, I added the url to the servers section of SonarQube and the same credentials I used in the browser. When I hit Test Connection, I get the error message:
Unable to connect: Query: https://mycompany.com/sonar//api/authentication/validate
I'm using the native option in Eclipse's network settings, since I'm not behind any proxy. The company SonarQube server version is 4.5.5.
Am I doing something wrong? Does anyone know how to fix this?
Edit: the certificate is also added to JRE
I suspect the /api/aut is due to some UI truncation, just expand the 'Add SonarQube Server' window to verify that.
You are trying to connect to an HTTPS URL, is the server certificate trusted by Java ? Use keytool to do that, as explained in this post.
Check the sonar link you have configured in eclipse - https://mycompany.com/sonar**//**api/authentication/validate
You need to give the url https://mycompany.com/sonar and not https://mycompany.com/sonar/

GitHub: Refresh failed: Could not connect to remote server

On GitHub Desktop (I use it on Windows), I have had this error over the last few days:
My Internet connection seems to work fine though. What could cause the issue?
Is your internet connection goes through firewall/proxy server. I found that GitHub Windows client is only reliably works when no proxy enabled. Being windows (.NET to be precise) application it takes proxy settings as they defined in Internet Explorer connection settings. Meanwhile, Git itself, which GitHub Windows client desktop application simply uses via command prompt, is governed by http and https proxy settings in .gitconfig file or environment variables. This discrepancy makes it quite sophisticated to setup.
What's interesting, is that desktop app was working the first time I installed it fresh (never had it on this Windows), but it wasn't able to connect to GitHub. Then I started to fiddle with --global http/https settings and I broke the app. Now, even uninstalling and installing it back again, I still have connectivity issues, as it seems to remember settings somewhere, as it doesn't prompt me with welcome screen and does remember my name.
Worth to mention, that even if the app complains about connection, I can clone the repo with it.
This worked for me:
In Internet Explorer: Tools/Internet Options/Connections/LAN Settings
Uncheck "Use a Proxy server..."
Restart GitHub.
You might also be able to disable the Proxy Server via Edge. In my case, I found that after turning it off in IE, it was off in Edge also.
Edit: I also had to update the GitHub application in order to be able to clone to my local repository.

Why Eclipse p2site is asking for credentials?

I have a p2site hosted on my server to provide Eclipse Update Site. The server is running an IIS 7.5
I have the same p2site content stored and provided both in my production environment and in my staging environment (two separate servers, with identical characteristics).
From a couple of days, if I connect with my staging environment p2site from an Eclipse Indigo instance, I'm required to enter credentials, which has never happened before.
Moreover, if I manually download the zip archive and install my plugin from this local archive, I'm asked the credentials too.
I can guess, but I'm not sure, that the problem can be related to the following: in the last days we have added HTTPS enablement for our web site, and installed our certificate in the root certificates of Windows Server 2008 R2.
Anyone knows why Eclipse (Indigo, haven't tested the other platforms yet) is behaving in this way?
And how can I prepare my local zip archive / p2site to overcome this issue?
Thank you very much
cghersi
Just for the sake of completeness, I found the solution on my own: the problem was that for some reasons (that I cannot still recognize...) there was a DENY rule in the .NetAuthorization section for the verbs OPTION,HEAD.
It seems that Eclipse send exactly these kind of requests when looking for p2site and so these requests were rejected and Eclipse was asking for credentials for these requests.
Hope is can be useful in the future for other people.
cghersi

EGit Clone Does not work

I can clone from command line but not via EGit (Eclipse). Extensive Googling did not yield an answer. This has been asked many times before, and I tried pretty much everything suggested.
I keep getting" cannot open git-upload-pack". Yes, I can clone from command line and then import. Then commit via Eclipse and push from command line. I have been doing so for a while now. Everything except pull and push works. Is this functionality just broken?
if you are sitting behind a proxy check your Eclipse proxy settings
any errors in the Eclipse error log ?
EGit 1.3.0 can definitively clone over https
what kind of http authentication does your git server want ? JGit/EGit at the
moment only supports basic and digest authentication
is your server using a self-signed SSL certificate ? Then you either need to
tell Java (on the EGit end) that it should trust this certificate or switch
off the SSL certificate using the git configuration parameter https.verify=false
The following describes the issue. There is no solution.
http://code.google.com/p/gitblit/issues/detail?id=4
EGit/JGit 3.0.0 now properly ignores hostname verification failures if http.sslVerify=false. This matches the behavior of native git.
The previous workaround was to generate a new self-signed, SSL certificate for the ip address/hostname you wished to serve on.
Another issue we came across: if you have an instance of Fiddler running, then it will (in effect) put a proxy between you and the outside world.
Kill Fiddler or limit what HTTPS trafic is decrypted by Fiddler for GIT to work correctly.