GitHub: Refresh failed: Could not connect to remote server - github

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.

Related

Java grey screen and setting JAVA_AWT_WM_NONREPARENTING for remote desktop

I'm having issue where all the java UI applications I open return an unusable grey screen. This is a known issue with known fixes.
The preferred fix is to use wmname, which would be great if my company wasn't making me jump through a million hoops to be allowed to download this program from the internet into our corporate infrastructure.
The other option was to set JAVA_AWT_WM_NONREPARENTING=1 in .xinitrc or .xinitrc. I set it in both files just to be sure and it worked perfectly... when connecting via a vnc client. Unfortunately it doesn't seem to help when connecting via remote desktop, even if I restart the xrdp server.
So how can I get my RDP connection to recognize and respect setting of JAVA_AWT_WM_NONREPARENTING?

VS Code Remote Development Errors

I am connected to my company's VPN on my Windows 10 desktop and uses VS Code for my development. I wanted to use VS Code Remote Development so that I can connect to my remote company development server and autosave my files directly on the server. I have installed VS Code Remote Development package and this is my SSH config.
Host my.company.server
HostName 10.XXX.XXX.XX6
User root
IdentityFile C:\Users\My_User\Documents\Company\company_key.pem
However, when connect VS Code to the remote server, VS Code shows that I am connected but I am getting the errors below and cannot view the remote directory.
Unable to write to Folder Settings because no resource is provided.
Could not fetch remote environment.
Failed to connect to the remote extension host server
(Error: Websocket close with status code 1006)
I tried connecting to the remote server using WinSCP and that works fine. I also used PowerShell to login using the below command and that works fine too.
ssh -i C:\Users\My_User\Documents\Company\company_key.pem root#10.XXX.XXX.XX6
What am I doing wrong here? Any VS Code gurus can assist me with this issue? Thanks.
VSCode was attempting to download and install several components on that remote machine, which probably was blocked by the machine administrators in your company (as downloading from an external resource is commonly seen as a security risk on an internal machine).
You should carefully review the information security policies of the company before making any violation. And then discuss with your manager to see if VSCode Remote should be used or not.

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

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.

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.

Debugging a GWT application in a remote environment

I have deployed my GWT application to its target environment (i.e. compiled and copied the war directory contents to the target device's /var/www) and some parts of it are not working. I understand that I can debug my local instance of the GWT app as if it were running in the target environment, by opening the deployed GWT App URL and adding gwt.codesvr URL parameter to it, like this:
http://deployment_host/gwtapp.html?gwt.codesvr=localhost:9997
I get
Plugin failed to connect to Development Mode server at localhost:9997
Follow the underlying troubleshooting instructions
My Chrome browser is running on the same machine as Eclipse, so localhost above should be ok. Just to make sure, I've added -bindAddress 0.0.0.0 in the Run/Debug configuration in Eclipse and tried with my external IP/hostname, with no change, except that the error message is updated accordingly. What am I doing wrong?
If I replace deployment_host with localhost above everything works fine, but it's of no use to me to debug locally. (There is some Proxy and ReverseProxy-ing going on in the local Apache, so I do not need the 8888 port when running locally, but this should be unrelated)
Questions Debugging GWT applications outside of dev mode? and Debug GWT application in a remote browser are related but do not help.
If you are using chrome, look in the address bar at the right for a grey GWT icon. In any other browser, you would see a popup message confirming that you want to debug, but in Chrome this apparently isn't possible.
Click the icon, and it will ask you to whitelist this site as allowed to run Java locally on your computer. After you whitelist it, it should run correctly.
Along the same lines as the answer above Ive just had some success restarting the extension helped (but restarting browser hadnt)
Just enable and disable it in :
chrome://chrome/extensions/
Good luck! It's the only thing wrong with GWT imho...