It's failed when I used Git command "git pull" to update my repository, messages as below: fatal: unable to access '...': Empty reply from server.
And the I tried to use the GitHub App, but alert this:
Cloning into 'renren_mobile'...
warning: templates not found /Applications/GitHub.app/Contents/Resources/git/templates
2014-11-23 13:58:57.975 GitHub for Mac Login[659:11891] AskPass with arguments: (
"/Applications/GitHub.app/Contents/MacOS/GitHub for Mac Login",
"Username for 'https://github.com': "
)
2014-11-23 13:58:58.032 GitHub for Mac Login[660:11915] AskPass with arguments: (
"/Applications/GitHub.app/Contents/MacOS/GitHub for Mac Login",
"Password for '': "
)
fatal: unable to access '...': Empty reply from server
(128)
For Ubuntu-like distro with your own git compiled: you might be missing libcurl4-openssl-dev
. apt install libcurl4-openssl-dev
then reconfigure, then make install
I was stuck in this problem until I noticed that I was not logged into my VPN.
If you have configured your proxy for a VPN, you need to login to your VPN to use the proxy.
to use it outside the VPN use the unset command:
git config --global --unset http.proxy
And remember to set the proxy when within the VPN.
I received the same error in pushing files to my private bitbucket repository. For some odd reasons, the request couldn't be sent and an empty reply was the result! I tried again with a proxy tunnel (you can use any other VPN applications) and it has been solved till now.
I guess that your git remote url has been set as SSH. You can set it as HTTPS:
git remote set-url origin https://github.com/YOUR_USERNAME/YOUR_REPOSITORY.git
Retry this command and there is prompt to enter username and password:
git pull
I think the solution mentioned above to remove the git credentials from windows credentials manager works. Basically it would have sourced with other git credentials in the cache. Flushing out the old ones would pave way to override the new credentials.
You can try for following solutions step by step one of them should work for you.
I have tried all three steps but STEP 4 worked for me. Because I was using two different git accounts
STEP 1:
STEP 2
Check your current branch git branch
if you are not on branch git
checkout branch_name
.
To create new branch use git checkout -b "new branch name"
to
switch on new branch use above command
STEP 3
In the special case that you are creating a new repository starting from an old repository that you used as a template (Don't do this if this is not your case). Completely erase the git files of the old repository so you can start a new one:
rm -rf .git
and repeat STEP 1
STEP 4
On windows, you can try putting write credentials or remove git credentials from the control panel by following way and repeat STEP 1
Go to Win -> Control Panel -> Credential Manager -> Windows Credentials
I solved, replacing 'http..' git url with 'ssh..' simple open .git/config file and copy it there
I solved such a problem by replacing https part of my remote origin with http. It is also a workaround. I think it may help someone in the future.
I had tried most of the answers here but didn't manage to resolve the issue (on Windows 10).
What resolved the problem was simply to upgrade version from git version 2.8.1.windows.1
to the latest version git version 2.10.1.windows.1
I had the same problem however, with a Jenkins installation. The response back from trying to clone was always:
stderr: fatal: unable to access 'https://my.gitlab.server/group/repo.git/': Empty reply from server
Unfortunately switching to http wasn't an option, so I needed the root cause. Turns out there was a http setting in the global config for the Jenkins user (likely added when we were running a self-signed cert on out gitlab instance). Taking look at the global config:
$ git config --global -l
http.sslverify=false
Removing this did the trick
$ git config --global --unset http.sslverify
(It also looks like this is a typo, with the correct key http.sslVerify
)
If unsetting using
git config --global --unset-all https.proxy
doesn't work for you .
Then check if the environment variable http_proxy and https_proxy are set . Check using this command : -
env | grep -i proxy
If this variable is set to something , then you can just unset it using :-
https_proxy=""
Try, this
git config --global --unset http.proxy
git config --global --unset https.proxy
I was also facing the same issue But my issue was due to wrong credentials stored in my keyChain. So I solved by removing my old credentials from my keychain.
I tried a few of the tricks listed here without any luck. Looks like something was getting cached by my terminal emulator (iTerm2) or session. The issue went away when I ran the command from a fresh terminal tab.
Source: Stackoverflow.com