How to resolve “git pull,fatal: unable to access 'https://github.com…': Empty reply from server”












41















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)









share|improve this question




















  • 1





    This might be a login or service problem. Probably better asked at superuser.stackexchange.com

    – Gábor Bakos
    Nov 23 '14 at 9:40


















41















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)









share|improve this question




















  • 1





    This might be a login or service problem. Probably better asked at superuser.stackexchange.com

    – Gábor Bakos
    Nov 23 '14 at 9:40
















41












41








41


12






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)









share|improve this question
















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)






git github






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 23 '14 at 9:50









mu 無

41.3k25103139




41.3k25103139










asked Nov 23 '14 at 9:33









MerlinMerlin

213134




213134








  • 1





    This might be a login or service problem. Probably better asked at superuser.stackexchange.com

    – Gábor Bakos
    Nov 23 '14 at 9:40
















  • 1





    This might be a login or service problem. Probably better asked at superuser.stackexchange.com

    – Gábor Bakos
    Nov 23 '14 at 9:40










1




1





This might be a login or service problem. Probably better asked at superuser.stackexchange.com

– Gábor Bakos
Nov 23 '14 at 9:40







This might be a login or service problem. Probably better asked at superuser.stackexchange.com

– Gábor Bakos
Nov 23 '14 at 9:40














11 Answers
11






active

oldest

votes


















27














I resolved this problem. I think it happened maybe because of https but I am not very sure.
You can Switch remote URLs from HTTPS to SSH.



1.Pls refer to this link for details:https://help.github.com/articles/changing-a-remote-s-url/



Also I had to config the ssh key.



2.Follow this:https://help.github.com/articles/generating-ssh-keys/



I came across this problem because I replaced my mac, but I do the transfer of data,I think it is probably because the key reasons.






share|improve this answer





















  • 4





    I'm adding a comment about this because it came up in google first and I want to expand on the answer here. I was getting error: Push failed: Failed with error: fatal: unable to access 'github.com/username/repo.git': Empty reply from server. For me as well as this answer this article from github helped: help.github.com/articles/changing-a-remote-s-url/…. I'm on OSX Yosemite

    – mjwatts
    Dec 29 '14 at 1:10













  • Yes, same error here. Changing the protocol from http to git resolved the issue and I could upload my repository.

    – Stefan Rein
    Jun 1 '17 at 8:44



















19














I was stuck in this problem until i noticed that i was not logged into my VPN.



Explanation:



1) If you have configured your proxy for a VPN, you need to login to your VPN to use the proxy.



2) 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.



Hope this comment saves someone the 3 hours I was pointlessly trying to read workarounds






share|improve this answer
























  • Thank you for mentioning VPN! That was my problem. I disabled my VPN (Private Internet Access) and everything worked.

    – Mike Miller
    Mar 10 at 21:02



















16














On Windows:



Go to Win -> Control Panel -> Credential Manager -> Windows Credentials



Search for github address and remove it.



enter image description here



Then try to execute:



git push -u origin master


Windows will ask for your git credentials again, put the right ones and that's it.






share|improve this answer



















  • 1





    Doesn't work. At least not for git clone. (As push doesn't work for repository that is not cloned yet [and read-only anyway])

    – Martini Bianco
    Feb 27 '18 at 13:14











  • This didn't work for me either, although it popped up the GitHub login dialog again it denied me with 403

    – Matthew Lock
    Sep 21 '18 at 8:47











  • Check if you have permissions to clone the repository, check if you need to install any certificate. There are some configurations that you might need to do --> take a look at this: stackoverflow.com/questions/9072376/…

    – Marco
    Sep 28 '18 at 9:05






  • 1





    @Marco thanks for solution it worked for me.

    – Sagar
    Oct 9 '18 at 11:13



















8














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.






share|improve this answer



















  • 2





    This solution is pure gold 🙏

    – Dhaval Jardosh
    Jul 20 '18 at 3:07











  • PhpStorm terminal will have problem, iTerm2 not. Thanks, solution weird but helps a lot ! 🙏

    – Patryk Padus
    Jul 20 '18 at 7:47











  • Restarting stuff seems to be a good solution for many issue when you use git !

    – AymDev
    Oct 17 '18 at 20:05











  • Super magical solution

    – Xinyao Wang
    Mar 26 at 0:13



















2














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.






share|improve this answer































    1














    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






    share|improve this answer

































      1














      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=""`





      share|improve this answer































        0














        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)






        share|improve this answer

































          0














          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.






          share|improve this answer


























          • What is a "proxy tunnel"? How did you configure it? Can you edit your answer to make that clear?

            – Artjom B.
            Oct 22 '18 at 20:31













          • I just used a free vpn application to access a private network and send my request remotely through public networks.

            – Alex Trn
            Oct 23 '18 at 8:51






          • 1





            To recap, your issue was that you could not access BitBucket (or only a single port), because it was blocked by your ISP/country for some reason and you've used VPN to work around this restriction. Keep in mind that proxies can usually look into the traffic even if the connection would be normally encrypted. Do this only if you trust the proxy provider. VPNs are different and provide a proper tunnel, so there you don't need as much trust.

            – Artjom B.
            Oct 23 '18 at 16:51













          • That's true, thanks for the hint

            – Alex Trn
            Oct 23 '18 at 17:10



















          0














          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:




          • git init

          • git add README.md

          • git commit -m "first commit"

          • git remote add origin https://github.com/XXXX/YYYY.git

          • git push -u origin master


          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 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 control panel by following way and repeat STEP 1



            Go to Win -> Control Panel -> Credential Manager -> Windows Credentials




          enter image description here






          share|improve this answer

































            -1














            I solved, replacing 'http..' git url with 'ssh..'
            simple open .git/config file and copy it there






            share|improve this answer
























              Your Answer






              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "1"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f27087483%2fhow-to-resolve-git-pull-fatal-unable-to-access-https-github-com-empty%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              11 Answers
              11






              active

              oldest

              votes








              11 Answers
              11






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              27














              I resolved this problem. I think it happened maybe because of https but I am not very sure.
              You can Switch remote URLs from HTTPS to SSH.



              1.Pls refer to this link for details:https://help.github.com/articles/changing-a-remote-s-url/



              Also I had to config the ssh key.



              2.Follow this:https://help.github.com/articles/generating-ssh-keys/



              I came across this problem because I replaced my mac, but I do the transfer of data,I think it is probably because the key reasons.






              share|improve this answer





















              • 4





                I'm adding a comment about this because it came up in google first and I want to expand on the answer here. I was getting error: Push failed: Failed with error: fatal: unable to access 'github.com/username/repo.git': Empty reply from server. For me as well as this answer this article from github helped: help.github.com/articles/changing-a-remote-s-url/…. I'm on OSX Yosemite

                – mjwatts
                Dec 29 '14 at 1:10













              • Yes, same error here. Changing the protocol from http to git resolved the issue and I could upload my repository.

                – Stefan Rein
                Jun 1 '17 at 8:44
















              27














              I resolved this problem. I think it happened maybe because of https but I am not very sure.
              You can Switch remote URLs from HTTPS to SSH.



              1.Pls refer to this link for details:https://help.github.com/articles/changing-a-remote-s-url/



              Also I had to config the ssh key.



              2.Follow this:https://help.github.com/articles/generating-ssh-keys/



              I came across this problem because I replaced my mac, but I do the transfer of data,I think it is probably because the key reasons.






              share|improve this answer





















              • 4





                I'm adding a comment about this because it came up in google first and I want to expand on the answer here. I was getting error: Push failed: Failed with error: fatal: unable to access 'github.com/username/repo.git': Empty reply from server. For me as well as this answer this article from github helped: help.github.com/articles/changing-a-remote-s-url/…. I'm on OSX Yosemite

                – mjwatts
                Dec 29 '14 at 1:10













              • Yes, same error here. Changing the protocol from http to git resolved the issue and I could upload my repository.

                – Stefan Rein
                Jun 1 '17 at 8:44














              27












              27








              27







              I resolved this problem. I think it happened maybe because of https but I am not very sure.
              You can Switch remote URLs from HTTPS to SSH.



              1.Pls refer to this link for details:https://help.github.com/articles/changing-a-remote-s-url/



              Also I had to config the ssh key.



              2.Follow this:https://help.github.com/articles/generating-ssh-keys/



              I came across this problem because I replaced my mac, but I do the transfer of data,I think it is probably because the key reasons.






              share|improve this answer















              I resolved this problem. I think it happened maybe because of https but I am not very sure.
              You can Switch remote URLs from HTTPS to SSH.



              1.Pls refer to this link for details:https://help.github.com/articles/changing-a-remote-s-url/



              Also I had to config the ssh key.



              2.Follow this:https://help.github.com/articles/generating-ssh-keys/



              I came across this problem because I replaced my mac, but I do the transfer of data,I think it is probably because the key reasons.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Feb 17 '15 at 7:28









              lovubuntu

              657714




              657714










              answered Dec 8 '14 at 5:52









              Hao KangHao Kang

              31435




              31435








              • 4





                I'm adding a comment about this because it came up in google first and I want to expand on the answer here. I was getting error: Push failed: Failed with error: fatal: unable to access 'github.com/username/repo.git': Empty reply from server. For me as well as this answer this article from github helped: help.github.com/articles/changing-a-remote-s-url/…. I'm on OSX Yosemite

                – mjwatts
                Dec 29 '14 at 1:10













              • Yes, same error here. Changing the protocol from http to git resolved the issue and I could upload my repository.

                – Stefan Rein
                Jun 1 '17 at 8:44














              • 4





                I'm adding a comment about this because it came up in google first and I want to expand on the answer here. I was getting error: Push failed: Failed with error: fatal: unable to access 'github.com/username/repo.git': Empty reply from server. For me as well as this answer this article from github helped: help.github.com/articles/changing-a-remote-s-url/…. I'm on OSX Yosemite

                – mjwatts
                Dec 29 '14 at 1:10













              • Yes, same error here. Changing the protocol from http to git resolved the issue and I could upload my repository.

                – Stefan Rein
                Jun 1 '17 at 8:44








              4




              4





              I'm adding a comment about this because it came up in google first and I want to expand on the answer here. I was getting error: Push failed: Failed with error: fatal: unable to access 'github.com/username/repo.git': Empty reply from server. For me as well as this answer this article from github helped: help.github.com/articles/changing-a-remote-s-url/…. I'm on OSX Yosemite

              – mjwatts
              Dec 29 '14 at 1:10







              I'm adding a comment about this because it came up in google first and I want to expand on the answer here. I was getting error: Push failed: Failed with error: fatal: unable to access 'github.com/username/repo.git': Empty reply from server. For me as well as this answer this article from github helped: help.github.com/articles/changing-a-remote-s-url/…. I'm on OSX Yosemite

              – mjwatts
              Dec 29 '14 at 1:10















              Yes, same error here. Changing the protocol from http to git resolved the issue and I could upload my repository.

              – Stefan Rein
              Jun 1 '17 at 8:44





              Yes, same error here. Changing the protocol from http to git resolved the issue and I could upload my repository.

              – Stefan Rein
              Jun 1 '17 at 8:44













              19














              I was stuck in this problem until i noticed that i was not logged into my VPN.



              Explanation:



              1) If you have configured your proxy for a VPN, you need to login to your VPN to use the proxy.



              2) 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.



              Hope this comment saves someone the 3 hours I was pointlessly trying to read workarounds






              share|improve this answer
























              • Thank you for mentioning VPN! That was my problem. I disabled my VPN (Private Internet Access) and everything worked.

                – Mike Miller
                Mar 10 at 21:02
















              19














              I was stuck in this problem until i noticed that i was not logged into my VPN.



              Explanation:



              1) If you have configured your proxy for a VPN, you need to login to your VPN to use the proxy.



              2) 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.



              Hope this comment saves someone the 3 hours I was pointlessly trying to read workarounds






              share|improve this answer
























              • Thank you for mentioning VPN! That was my problem. I disabled my VPN (Private Internet Access) and everything worked.

                – Mike Miller
                Mar 10 at 21:02














              19












              19








              19







              I was stuck in this problem until i noticed that i was not logged into my VPN.



              Explanation:



              1) If you have configured your proxy for a VPN, you need to login to your VPN to use the proxy.



              2) 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.



              Hope this comment saves someone the 3 hours I was pointlessly trying to read workarounds






              share|improve this answer













              I was stuck in this problem until i noticed that i was not logged into my VPN.



              Explanation:



              1) If you have configured your proxy for a VPN, you need to login to your VPN to use the proxy.



              2) 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.



              Hope this comment saves someone the 3 hours I was pointlessly trying to read workarounds







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Jun 1 '16 at 15:40









              Ganesh Kamath - 'Code Frenzy'Ganesh Kamath - 'Code Frenzy'

              3,5843042




              3,5843042













              • Thank you for mentioning VPN! That was my problem. I disabled my VPN (Private Internet Access) and everything worked.

                – Mike Miller
                Mar 10 at 21:02



















              • Thank you for mentioning VPN! That was my problem. I disabled my VPN (Private Internet Access) and everything worked.

                – Mike Miller
                Mar 10 at 21:02

















              Thank you for mentioning VPN! That was my problem. I disabled my VPN (Private Internet Access) and everything worked.

              – Mike Miller
              Mar 10 at 21:02





              Thank you for mentioning VPN! That was my problem. I disabled my VPN (Private Internet Access) and everything worked.

              – Mike Miller
              Mar 10 at 21:02











              16














              On Windows:



              Go to Win -> Control Panel -> Credential Manager -> Windows Credentials



              Search for github address and remove it.



              enter image description here



              Then try to execute:



              git push -u origin master


              Windows will ask for your git credentials again, put the right ones and that's it.






              share|improve this answer



















              • 1





                Doesn't work. At least not for git clone. (As push doesn't work for repository that is not cloned yet [and read-only anyway])

                – Martini Bianco
                Feb 27 '18 at 13:14











              • This didn't work for me either, although it popped up the GitHub login dialog again it denied me with 403

                – Matthew Lock
                Sep 21 '18 at 8:47











              • Check if you have permissions to clone the repository, check if you need to install any certificate. There are some configurations that you might need to do --> take a look at this: stackoverflow.com/questions/9072376/…

                – Marco
                Sep 28 '18 at 9:05






              • 1





                @Marco thanks for solution it worked for me.

                – Sagar
                Oct 9 '18 at 11:13
















              16














              On Windows:



              Go to Win -> Control Panel -> Credential Manager -> Windows Credentials



              Search for github address and remove it.



              enter image description here



              Then try to execute:



              git push -u origin master


              Windows will ask for your git credentials again, put the right ones and that's it.






              share|improve this answer



















              • 1





                Doesn't work. At least not for git clone. (As push doesn't work for repository that is not cloned yet [and read-only anyway])

                – Martini Bianco
                Feb 27 '18 at 13:14











              • This didn't work for me either, although it popped up the GitHub login dialog again it denied me with 403

                – Matthew Lock
                Sep 21 '18 at 8:47











              • Check if you have permissions to clone the repository, check if you need to install any certificate. There are some configurations that you might need to do --> take a look at this: stackoverflow.com/questions/9072376/…

                – Marco
                Sep 28 '18 at 9:05






              • 1





                @Marco thanks for solution it worked for me.

                – Sagar
                Oct 9 '18 at 11:13














              16












              16








              16







              On Windows:



              Go to Win -> Control Panel -> Credential Manager -> Windows Credentials



              Search for github address and remove it.



              enter image description here



              Then try to execute:



              git push -u origin master


              Windows will ask for your git credentials again, put the right ones and that's it.






              share|improve this answer













              On Windows:



              Go to Win -> Control Panel -> Credential Manager -> Windows Credentials



              Search for github address and remove it.



              enter image description here



              Then try to execute:



              git push -u origin master


              Windows will ask for your git credentials again, put the right ones and that's it.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Sep 26 '16 at 10:03









              MarcoMarco

              1,13311315




              1,13311315








              • 1





                Doesn't work. At least not for git clone. (As push doesn't work for repository that is not cloned yet [and read-only anyway])

                – Martini Bianco
                Feb 27 '18 at 13:14











              • This didn't work for me either, although it popped up the GitHub login dialog again it denied me with 403

                – Matthew Lock
                Sep 21 '18 at 8:47











              • Check if you have permissions to clone the repository, check if you need to install any certificate. There are some configurations that you might need to do --> take a look at this: stackoverflow.com/questions/9072376/…

                – Marco
                Sep 28 '18 at 9:05






              • 1





                @Marco thanks for solution it worked for me.

                – Sagar
                Oct 9 '18 at 11:13














              • 1





                Doesn't work. At least not for git clone. (As push doesn't work for repository that is not cloned yet [and read-only anyway])

                – Martini Bianco
                Feb 27 '18 at 13:14











              • This didn't work for me either, although it popped up the GitHub login dialog again it denied me with 403

                – Matthew Lock
                Sep 21 '18 at 8:47











              • Check if you have permissions to clone the repository, check if you need to install any certificate. There are some configurations that you might need to do --> take a look at this: stackoverflow.com/questions/9072376/…

                – Marco
                Sep 28 '18 at 9:05






              • 1





                @Marco thanks for solution it worked for me.

                – Sagar
                Oct 9 '18 at 11:13








              1




              1





              Doesn't work. At least not for git clone. (As push doesn't work for repository that is not cloned yet [and read-only anyway])

              – Martini Bianco
              Feb 27 '18 at 13:14





              Doesn't work. At least not for git clone. (As push doesn't work for repository that is not cloned yet [and read-only anyway])

              – Martini Bianco
              Feb 27 '18 at 13:14













              This didn't work for me either, although it popped up the GitHub login dialog again it denied me with 403

              – Matthew Lock
              Sep 21 '18 at 8:47





              This didn't work for me either, although it popped up the GitHub login dialog again it denied me with 403

              – Matthew Lock
              Sep 21 '18 at 8:47













              Check if you have permissions to clone the repository, check if you need to install any certificate. There are some configurations that you might need to do --> take a look at this: stackoverflow.com/questions/9072376/…

              – Marco
              Sep 28 '18 at 9:05





              Check if you have permissions to clone the repository, check if you need to install any certificate. There are some configurations that you might need to do --> take a look at this: stackoverflow.com/questions/9072376/…

              – Marco
              Sep 28 '18 at 9:05




              1




              1





              @Marco thanks for solution it worked for me.

              – Sagar
              Oct 9 '18 at 11:13





              @Marco thanks for solution it worked for me.

              – Sagar
              Oct 9 '18 at 11:13











              8














              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.






              share|improve this answer



















              • 2





                This solution is pure gold 🙏

                – Dhaval Jardosh
                Jul 20 '18 at 3:07











              • PhpStorm terminal will have problem, iTerm2 not. Thanks, solution weird but helps a lot ! 🙏

                – Patryk Padus
                Jul 20 '18 at 7:47











              • Restarting stuff seems to be a good solution for many issue when you use git !

                – AymDev
                Oct 17 '18 at 20:05











              • Super magical solution

                – Xinyao Wang
                Mar 26 at 0:13
















              8














              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.






              share|improve this answer



















              • 2





                This solution is pure gold 🙏

                – Dhaval Jardosh
                Jul 20 '18 at 3:07











              • PhpStorm terminal will have problem, iTerm2 not. Thanks, solution weird but helps a lot ! 🙏

                – Patryk Padus
                Jul 20 '18 at 7:47











              • Restarting stuff seems to be a good solution for many issue when you use git !

                – AymDev
                Oct 17 '18 at 20:05











              • Super magical solution

                – Xinyao Wang
                Mar 26 at 0:13














              8












              8








              8







              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.






              share|improve this answer













              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.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Feb 21 '18 at 21:12









              izilottiizilotti

              3,57013845




              3,57013845








              • 2





                This solution is pure gold 🙏

                – Dhaval Jardosh
                Jul 20 '18 at 3:07











              • PhpStorm terminal will have problem, iTerm2 not. Thanks, solution weird but helps a lot ! 🙏

                – Patryk Padus
                Jul 20 '18 at 7:47











              • Restarting stuff seems to be a good solution for many issue when you use git !

                – AymDev
                Oct 17 '18 at 20:05











              • Super magical solution

                – Xinyao Wang
                Mar 26 at 0:13














              • 2





                This solution is pure gold 🙏

                – Dhaval Jardosh
                Jul 20 '18 at 3:07











              • PhpStorm terminal will have problem, iTerm2 not. Thanks, solution weird but helps a lot ! 🙏

                – Patryk Padus
                Jul 20 '18 at 7:47











              • Restarting stuff seems to be a good solution for many issue when you use git !

                – AymDev
                Oct 17 '18 at 20:05











              • Super magical solution

                – Xinyao Wang
                Mar 26 at 0:13








              2




              2





              This solution is pure gold 🙏

              – Dhaval Jardosh
              Jul 20 '18 at 3:07





              This solution is pure gold 🙏

              – Dhaval Jardosh
              Jul 20 '18 at 3:07













              PhpStorm terminal will have problem, iTerm2 not. Thanks, solution weird but helps a lot ! 🙏

              – Patryk Padus
              Jul 20 '18 at 7:47





              PhpStorm terminal will have problem, iTerm2 not. Thanks, solution weird but helps a lot ! 🙏

              – Patryk Padus
              Jul 20 '18 at 7:47













              Restarting stuff seems to be a good solution for many issue when you use git !

              – AymDev
              Oct 17 '18 at 20:05





              Restarting stuff seems to be a good solution for many issue when you use git !

              – AymDev
              Oct 17 '18 at 20:05













              Super magical solution

              – Xinyao Wang
              Mar 26 at 0:13





              Super magical solution

              – Xinyao Wang
              Mar 26 at 0:13











              2














              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.






              share|improve this answer




























                2














                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.






                share|improve this answer


























                  2












                  2








                  2







                  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.






                  share|improve this answer













                  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.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Sep 2 '15 at 12:47









                  ddsultanddsultan

                  796915




                  796915























                      1














                      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






                      share|improve this answer






























                        1














                        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






                        share|improve this answer




























                          1












                          1








                          1







                          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






                          share|improve this answer















                          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







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Oct 7 '16 at 23:34









                          treiff

                          8721120




                          8721120










                          answered Oct 7 '16 at 19:48









                          Niki DimitrovNiki Dimitrov

                          4615




                          4615























                              1














                              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=""`





                              share|improve this answer




























                                1














                                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=""`





                                share|improve this answer


























                                  1












                                  1








                                  1







                                  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=""`





                                  share|improve this answer













                                  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=""`






                                  share|improve this answer












                                  share|improve this answer



                                  share|improve this answer










                                  answered Nov 5 '17 at 11:40









                                  Natesh bhatNatesh bhat

                                  3,2402039




                                  3,2402039























                                      0














                                      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)






                                      share|improve this answer






























                                        0














                                        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)






                                        share|improve this answer




























                                          0












                                          0








                                          0







                                          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)






                                          share|improve this answer















                                          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)







                                          share|improve this answer














                                          share|improve this answer



                                          share|improve this answer








                                          edited Jun 30 '16 at 8:15

























                                          answered Jun 29 '16 at 15:17









                                          mbarnettjonesmbarnettjones

                                          1115




                                          1115























                                              0














                                              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.






                                              share|improve this answer


























                                              • What is a "proxy tunnel"? How did you configure it? Can you edit your answer to make that clear?

                                                – Artjom B.
                                                Oct 22 '18 at 20:31













                                              • I just used a free vpn application to access a private network and send my request remotely through public networks.

                                                – Alex Trn
                                                Oct 23 '18 at 8:51






                                              • 1





                                                To recap, your issue was that you could not access BitBucket (or only a single port), because it was blocked by your ISP/country for some reason and you've used VPN to work around this restriction. Keep in mind that proxies can usually look into the traffic even if the connection would be normally encrypted. Do this only if you trust the proxy provider. VPNs are different and provide a proper tunnel, so there you don't need as much trust.

                                                – Artjom B.
                                                Oct 23 '18 at 16:51













                                              • That's true, thanks for the hint

                                                – Alex Trn
                                                Oct 23 '18 at 17:10
















                                              0














                                              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.






                                              share|improve this answer


























                                              • What is a "proxy tunnel"? How did you configure it? Can you edit your answer to make that clear?

                                                – Artjom B.
                                                Oct 22 '18 at 20:31













                                              • I just used a free vpn application to access a private network and send my request remotely through public networks.

                                                – Alex Trn
                                                Oct 23 '18 at 8:51






                                              • 1





                                                To recap, your issue was that you could not access BitBucket (or only a single port), because it was blocked by your ISP/country for some reason and you've used VPN to work around this restriction. Keep in mind that proxies can usually look into the traffic even if the connection would be normally encrypted. Do this only if you trust the proxy provider. VPNs are different and provide a proper tunnel, so there you don't need as much trust.

                                                – Artjom B.
                                                Oct 23 '18 at 16:51













                                              • That's true, thanks for the hint

                                                – Alex Trn
                                                Oct 23 '18 at 17:10














                                              0












                                              0








                                              0







                                              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.






                                              share|improve this answer















                                              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.







                                              share|improve this answer














                                              share|improve this answer



                                              share|improve this answer








                                              edited Oct 23 '18 at 8:53

























                                              answered Oct 22 '18 at 20:02









                                              Alex TrnAlex Trn

                                              1151213




                                              1151213













                                              • What is a "proxy tunnel"? How did you configure it? Can you edit your answer to make that clear?

                                                – Artjom B.
                                                Oct 22 '18 at 20:31













                                              • I just used a free vpn application to access a private network and send my request remotely through public networks.

                                                – Alex Trn
                                                Oct 23 '18 at 8:51






                                              • 1





                                                To recap, your issue was that you could not access BitBucket (or only a single port), because it was blocked by your ISP/country for some reason and you've used VPN to work around this restriction. Keep in mind that proxies can usually look into the traffic even if the connection would be normally encrypted. Do this only if you trust the proxy provider. VPNs are different and provide a proper tunnel, so there you don't need as much trust.

                                                – Artjom B.
                                                Oct 23 '18 at 16:51













                                              • That's true, thanks for the hint

                                                – Alex Trn
                                                Oct 23 '18 at 17:10



















                                              • What is a "proxy tunnel"? How did you configure it? Can you edit your answer to make that clear?

                                                – Artjom B.
                                                Oct 22 '18 at 20:31













                                              • I just used a free vpn application to access a private network and send my request remotely through public networks.

                                                – Alex Trn
                                                Oct 23 '18 at 8:51






                                              • 1





                                                To recap, your issue was that you could not access BitBucket (or only a single port), because it was blocked by your ISP/country for some reason and you've used VPN to work around this restriction. Keep in mind that proxies can usually look into the traffic even if the connection would be normally encrypted. Do this only if you trust the proxy provider. VPNs are different and provide a proper tunnel, so there you don't need as much trust.

                                                – Artjom B.
                                                Oct 23 '18 at 16:51













                                              • That's true, thanks for the hint

                                                – Alex Trn
                                                Oct 23 '18 at 17:10

















                                              What is a "proxy tunnel"? How did you configure it? Can you edit your answer to make that clear?

                                              – Artjom B.
                                              Oct 22 '18 at 20:31







                                              What is a "proxy tunnel"? How did you configure it? Can you edit your answer to make that clear?

                                              – Artjom B.
                                              Oct 22 '18 at 20:31















                                              I just used a free vpn application to access a private network and send my request remotely through public networks.

                                              – Alex Trn
                                              Oct 23 '18 at 8:51





                                              I just used a free vpn application to access a private network and send my request remotely through public networks.

                                              – Alex Trn
                                              Oct 23 '18 at 8:51




                                              1




                                              1





                                              To recap, your issue was that you could not access BitBucket (or only a single port), because it was blocked by your ISP/country for some reason and you've used VPN to work around this restriction. Keep in mind that proxies can usually look into the traffic even if the connection would be normally encrypted. Do this only if you trust the proxy provider. VPNs are different and provide a proper tunnel, so there you don't need as much trust.

                                              – Artjom B.
                                              Oct 23 '18 at 16:51







                                              To recap, your issue was that you could not access BitBucket (or only a single port), because it was blocked by your ISP/country for some reason and you've used VPN to work around this restriction. Keep in mind that proxies can usually look into the traffic even if the connection would be normally encrypted. Do this only if you trust the proxy provider. VPNs are different and provide a proper tunnel, so there you don't need as much trust.

                                              – Artjom B.
                                              Oct 23 '18 at 16:51















                                              That's true, thanks for the hint

                                              – Alex Trn
                                              Oct 23 '18 at 17:10





                                              That's true, thanks for the hint

                                              – Alex Trn
                                              Oct 23 '18 at 17:10











                                              0














                                              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:




                                              • git init

                                              • git add README.md

                                              • git commit -m "first commit"

                                              • git remote add origin https://github.com/XXXX/YYYY.git

                                              • git push -u origin master


                                              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 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 control panel by following way and repeat STEP 1



                                                Go to Win -> Control Panel -> Credential Manager -> Windows Credentials




                                              enter image description here






                                              share|improve this answer






























                                                0














                                                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:




                                                • git init

                                                • git add README.md

                                                • git commit -m "first commit"

                                                • git remote add origin https://github.com/XXXX/YYYY.git

                                                • git push -u origin master


                                                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 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 control panel by following way and repeat STEP 1



                                                  Go to Win -> Control Panel -> Credential Manager -> Windows Credentials




                                                enter image description here






                                                share|improve this answer




























                                                  0












                                                  0








                                                  0







                                                  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:




                                                  • git init

                                                  • git add README.md

                                                  • git commit -m "first commit"

                                                  • git remote add origin https://github.com/XXXX/YYYY.git

                                                  • git push -u origin master


                                                  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 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 control panel by following way and repeat STEP 1



                                                    Go to Win -> Control Panel -> Credential Manager -> Windows Credentials




                                                  enter image description here






                                                  share|improve this answer















                                                  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:




                                                  • git init

                                                  • git add README.md

                                                  • git commit -m "first commit"

                                                  • git remote add origin https://github.com/XXXX/YYYY.git

                                                  • git push -u origin master


                                                  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 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 control panel by following way and repeat STEP 1



                                                    Go to Win -> Control Panel -> Credential Manager -> Windows Credentials




                                                  enter image description here







                                                  share|improve this answer














                                                  share|improve this answer



                                                  share|improve this answer








                                                  edited Feb 28 at 5:24

























                                                  answered Oct 9 '18 at 11:33









                                                  SagarSagar

                                                  1,0211226




                                                  1,0211226























                                                      -1














                                                      I solved, replacing 'http..' git url with 'ssh..'
                                                      simple open .git/config file and copy it there






                                                      share|improve this answer




























                                                        -1














                                                        I solved, replacing 'http..' git url with 'ssh..'
                                                        simple open .git/config file and copy it there






                                                        share|improve this answer


























                                                          -1












                                                          -1








                                                          -1







                                                          I solved, replacing 'http..' git url with 'ssh..'
                                                          simple open .git/config file and copy it there






                                                          share|improve this answer













                                                          I solved, replacing 'http..' git url with 'ssh..'
                                                          simple open .git/config file and copy it there







                                                          share|improve this answer












                                                          share|improve this answer



                                                          share|improve this answer










                                                          answered Apr 3 '16 at 9:53









                                                          Dmitri AlgazinDmitri Algazin

                                                          2,4721720




                                                          2,4721720






























                                                              draft saved

                                                              draft discarded




















































                                                              Thanks for contributing an answer to Stack Overflow!


                                                              • Please be sure to answer the question. Provide details and share your research!

                                                              But avoid



                                                              • Asking for help, clarification, or responding to other answers.

                                                              • Making statements based on opinion; back them up with references or personal experience.


                                                              To learn more, see our tips on writing great answers.




                                                              draft saved


                                                              draft discarded














                                                              StackExchange.ready(
                                                              function () {
                                                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f27087483%2fhow-to-resolve-git-pull-fatal-unable-to-access-https-github-com-empty%23new-answer', 'question_page');
                                                              }
                                                              );

                                                              Post as a guest















                                                              Required, but never shown





















































                                                              Required, but never shown














                                                              Required, but never shown












                                                              Required, but never shown







                                                              Required, but never shown

































                                                              Required, but never shown














                                                              Required, but never shown












                                                              Required, but never shown







                                                              Required, but never shown







                                                              Popular posts from this blog

                                                              Xamarin.iOS Cant Deploy on Iphone

                                                              Glorious Revolution

                                                              Dulmage-Mendelsohn matrix decomposition in Python