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. The solution was following: I've corrected my url in
.git/config
. Just copied that from HTTPS clone URL. That would be something like that:It worked.
According to my experience, one of the reasons this problem occured is because you have an unstable internet connection.
Try removing the GIT_SSH environment variable with
unset GIT_SSH
. This was the cause of my problem.I had the same problem.
This error means that you have not specified your remote URL location upon which your code will push.
You can set remote URL by 2 (mainly) ways:
Specify remote URL via executing command on Git Bash.
Navigate to your project directory
Open Git Bash
Execute command:
git remote set-url origin <https://abc.xyz/USERNAME/REPOSITORY.git>
Mention remote URL direct in config file
Navigate to your project directory
Move to .git folder
Open config file in text editor
Copy and paste below lines
[remote "origin"] url = https://abc.xyz/USERNAME/REPOSITORY.git fetch = +refs/heads/*:refs/remotes/origin/*
For more detailed info visit this link.
After doing some research I've finally got solution for this, you have declared a environment variable to plink.exe path. So if you remove that path, reopen the git bash and try cloning through SSH it will work.
Refer to this link
http://sourceforge.net/p/forge/site-support/2959/#204c
Make sure ssh-agent is running: eval "$(ssh-agent -s)"
https://help.github.com/articles/generating-ssh-keys/#step-3-add-your-key-to-the-ssh-agent