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 just wanted to share that i found a easy fix for that:
Access denied. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
just logout from gitlab and login again. The problems should then be fixed.
You can specify the username that SSH should send to the remote system as part of your remote's URL. Put the username, followed by an
@
, before the remote hostname.This is usually caused due to the SSH key is not matching with the remote.
Solutions:
Go to terminal and type the following command (Mac, Linux) replace with your email id.
ssh-keygen -t rsa -C "you@email.com"
Copy the generated key using following command starting from word ssh.
cat ~/.ssh/id_rsa.pub
I had a perfectly fine working git and suddenly I got that error when I tried to push to the master. As I found out, it was because the repository host had problems.
If you using GitHub or Bitbucket you can easily check the status at
https://status.github.com/messages or https://status.bitbucket.org/
I just wanted to add to this question. I had Git setup to use PLink and Pageant for authentication and I was also getting the error
FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey)
. I had Pageant opened but the error was still showing up. The problem? I didn't have the private key loaded in Pageant (to add a key, follow these instructions). It was that simple.In my case I was using an ssh key with a password to authenticate with github. I hadn't set up pageant properly in Windows (only in cygwin). The missing steps were to point the git_ssh environment variable to plink.exe. Also, you need to get github.com into the plink known_hosts.
Hope this helps!
I sure wish intellij would have given me a more useful error, or better yet asked me to type in the ssh key password.