- Cause
If I am using ssh, public key between server<->git probably does not match or not connected.
$ git push origin main
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
...
- Solution
Create new ssh key on github.
#Get the public key from server.
$ vi ~/.ssh/id_rsa.pub
>>>
ssh-rsa AAAAB3NzaC1yc2EAA
...
And then issue the key in github.
'Git' 카테고리의 다른 글
Add my code to my teammate's code using git branch (0) | 2022.07.12 |
---|---|
Push files to github with Personal access tokens (0) | 2022.06.15 |
git error : src refspec master does not match any (0) | 2022.06.15 |
git error : Updates were rejected because the tip of your current branch is behind (0) | 2021.11.18 |
init, add, commit, checkout, branch, push, pull request, pull, logs, fetch (0) | 2021.06.13 |