I am trying to push the code from the repository when I encountered this error:
No anonymous write access.
I have followed the steps mentioned in
Is there another solution too apart from the clarification?
I copied all the content as per the answers I received. But then, I changed my remote from a https
to a ssh
link, and then I am getting this error while pushing:
sign_and_send_pubkey: signing failed: agent refused operation
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
CodePudding user response:
Clarified: Copy the whole thing in the key field of the GitHub account.
ssh-ed25519 <key> <email>
If the error still persists after following the tutorial given in the link, then change the remote of the repository from
https
tossh
usinggit remote set-url origin [email protected]:<username>/<reponame>.git
Now if you encounter the error
sign_and_send_pubkey: signing failed: agent refused operation [email protected]: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
Never forget to add the SSH key from where you are pushing the code:
ssh-add
CodePudding user response:
Copy everything as it is from your public key something.pub
to the key
section of the GitHub SSH settings page.
The key should be like this: ssh-rsa <key> <username>@<machine_name>
CodePudding user response:
You can read here to test your SSH connection before pushing your code to remote: Test SSH connection on GitHub