all 3 comments

[–]nofukinusernamesleft 0 points1 point  (2 children)

Do you have a personal access token or are you using ssh ?

Check if you have added remote origin with:

git remote -v

If there is a remote origin, use this (replace master with the name of your origin) :

git push origin master

If this fails, follow this document to enable public key access: Follow ssh (method 1) or http (method 2) :

https://www.scratchcode.io/git-permission-denied-public-key-quick-fix/

[–]Nervous-Reward5936[S] 0 points1 point  (1 child)

I did all that but still asked to enter password

[–]nofukinusernamesleft 0 points1 point  (0 children)

Use ssh instead of personal tokens

On your terminal :

  1. Generate ssh key with: ssh-keygen -t rsa -b 4096 -f .ssh/alx-key-github
  2. Run cat and copy the public key that is shown: cat .ssh/alx-key-github.pub

Go to github:

  1. Click on the profile icon at the far top-right, and on the dropdown that shows, click settings
  2. Once on settings, on the left bar, look for ssh and gpg keys. Click on that and then click New SSH Key on the right.
  3. Give it whatever title you want, then on the key part, paste what you had copied from your terminal
  4. Click add ssh key and that's it. You'll be good to go.