I have a following problem:
$ git push -u origin master Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
I have already checked the connection doing this:
$ ssh -vT [email protected]
and output looks good, I was correctly authenticated.
While checking further, I noticed that:
$ ssh-add -l The agent has no identities.
I have tried to run ssh-agent, but nothing changed:
$ ssh-agent SSH_AUTH_SOCK=/tmp/ssh-A1mhFqvqncuO/agent.766; export SSH_AUTH_SOCK; SSH_AGENT_PID=767; export SSH_AGENT_PID; echo Agent pid 767; $ ssh-add -l Could not open a connection to your authentication agent.
I am using Arch Linux. Any help would be strong appreciated! Thanks in advance!
Github diagnostic help here.
In terminal enter this command with your ssh file name pbcopy < ~/. ssh/id_rsa. pub This will copy the file to your clipboard Now open you github account Go to Settings > SSH and GPG keys > New SSH key Enter title and paste the key from clipboard and save it. Voila you're done.
go to KeyChain Access, Search for "GitHub", then when then result "github.com" pops up, change the account or password to your new account, and save.
A commit gets rejected and causes a failed to push some refs to error because the remote branch contains code that you do not have locally. What this means is that your local git repository is not compatible with the remote origin. Based on the above, your local machine is missing commits C and D.
I had the similar problem and my problem was solved by running the following command to add my key to the list of known keys:
ssh-add ~/.ssh/id_rsa
Hope it solves yours too. ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With