Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git: fatal: Could not read from remote repository

Tags:

git

I am trying to set git up with http://danielmiessler.com/study/git/#website to manage my site.

I have gotten to the last step in the instructions: git push website +master:refs/heads/master

I am working using the git ming32 command line in win7

$ git push website +master:refs/heads/master Bill@***.com's password: Connection closed by 198.91.80.3 fatal: Could not read from remote repository.  Please make sure you have the correct access rights and the repository exists. 

One problem here may be that the program is looking for Bill@***.com. when I connect via ssh to my site I have a different username( lets say 'abc'). so maybe this should be abc@***.com. If so I don't know how to change this or if I can push under an alias

like image 453
user1592380 Avatar asked Nov 22 '12 09:11

user1592380


People also ask

How resolve fatal Cannot be read from remote repository?

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.

How do I fix git GitHub Permission denied Publickey fatal could not read from remote repository?

The “Permission denied (publickey). fatal: Could not read from remote repository” error is caused by an issue with the way in which you authenticate with a Git repository. To solve this error, make sure your key is being used on your Git account. If it is not, add your key to Git.

How do I fix a fatal Not a git repository?

Check that you correctly created the repo. If the directory doesn't contain a . git repo, use git init to properly initialize the repo or clone an existing repo. Make sure your HEAD file contains the correct information on your current branch.


1 Answers

Your ssh key most likely had been removed from ssh agent

ssh-add ~/.ssh/id_rsa 

where id_rsa is a ssh key associated with git repo

Update

You may get Could not open a connection to your authentication agent. error to resolve that you need to start the agent first by:

eval `ssh-agent -s` 
like image 182
Johnny Cage Avatar answered Sep 17 '22 14:09

Johnny Cage