Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git error: couldn't connect to host while accessing

Tags:

Am getting the following error while trying to pull/push or create new-clone

error: couldn't connect to host while accessing https://github.com/user/pack.git/info/refs fatal: HTTP request failed

when i googled, people suggested to setup http_proxy.. but i don't understand it or i don't know to setup it.. am totally stuck up with it..

i don't know how to overcome these issues..

any help would be appreciated..

NB: note that i was able to use git before couple of days.. in the last couple of days it has been screwed up.. please help..

like image 571
user717787 Avatar asked Aug 09 '12 19:08

user717787


People also ask

How to solve fatal unable to access could not resolve host github com?

This can be caused by incorrect proxy settings, or error typing names, make sure you're using the exact URL of whatever you're trying to do. Try these commands. Also set user- name and user-email. Hope this will solve your error.

How do you fix fatal could not read from remote repository please make sure you have the correct access rights and the repository exists?

The Git “fatal: Could not read from remote repository” error occurs when there is an issue authenticating with a Git repository. This is common if you have incorrectly set up SSH authentication. To solve this error, make sure your SSH key is in your keychain and you connecting to a repository using the correct URL.

Can Git connect to repository?

Go to Window -> Preferences -> Team -> Git -> Configuration, click 'Repository Settings' tab and paste your GIT ssh URI to remote. origin. url.


2 Answers

git config --global --unset http.proxy  git config --global --unset https.proxy 

works for me

like image 170
Léon Jiresse Avatar answered Oct 12 '22 21:10

Léon Jiresse


This happened to me on my Vagrant VirtualBox VM running Ubuntu 12.04. The vagrant instance had been up for several days. I restarted the VM (vagrant reload), ssh'd back in, and it worked.

What's the cause? Not sure. Someone else can speculate. However, I always like to reboot three times just to be sure ;)

like image 32
Bill Paetzke Avatar answered Oct 12 '22 22:10

Bill Paetzke