Home > Mobile >  Git push from Visual Studio Code gives "remote: No anonymous write access"
Git push from Visual Studio Code gives "remote: No anonymous write access"

Time:11-17

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 Enter image description here

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:

  1. Clarified: Copy the whole thing in the key field of the GitHub account.

    ssh-ed25519 <key> <email>

  2. If the error still persists after following the tutorial given in the link, then change the remote of the repository from https to ssh using

    git remote set-url origin [email protected]:<username>/<reponame>.git
    
  3. 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

  • Related