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
I had the same error, which brought me to this answer that didn't help me. I was trying to create a new "bare" repository for the first time using the commands below to track to an NTFS location:
My problem turned out to be using the back slashes instead of forward slashes in the NTFS location when trying to add origin to set the (new) tracked upstream branch.
I had to remove the origin using:
Then add the origin again using the expected forward slashes
Hope this helps someone in the future.
I was facing same issue a while ago...
my .git/config had
I replaced it with
and it works now:)
In your .git/config file
And simply
Make sure you have correct url in
.git/config
If it's your first push, you'll need to set up correct upstream
You can check which key is used by:
The reply should contain something like this:
Also it's possible to define rules for ssh in
~/.ssh/config
, e.g. based on aliases:You can set connect to different ports, use different username etc. for each alias.
Your ssh key most likely had been removed from ssh agent
where id_rsa is a ssh key associated with git repo
For my case, I am using Corporate network (without internet connection) in office. In order to pull code from github, I set https proxy in gitbash and then use https instead of ssh to pull code,it works fine. However when comes to push code, the https proxy won't work. So either switch to Internet network (with internet connection) or set ssh proxy can solve the problem.