๐ETC./โ๏ธ Tool
[Github] git@github.com: Permission denied (publickey). ์๋ฌ ํด๊ฒฐ
yujch
2022. 10. 8. 01:23
๋ฐ์ํ
git push ๋๋ git pull ํ ๋ ๋ฐ์ํ๋ ์๋ฌ
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
์๋ก ssh key๋ฅผ ๋ง๋ค์ด์ค์ผ ํจ.
ssh key ์์ฑ
ssh-keygen -t rsa -C "{๋ณธ์ธ์ ๊นํ๋ธ ์ด๋ฉ์ผ}"
์ ๋ช ๋ น์ด๋ฅผ ์ ๋ ฅํ๋ฉด ๋จ.
1. ssh key ์ ์ฅ ์์น ์ง์ (์ํฐํ๋ฉด ๊ธฐ๋ณธ ์ง์ ๋ ์์น์ ์ ์ฅ)
2. ๋น๋ฐ๋ฒํธ ์ง์ (์ํฐํด์ ๋๊ธฐ๊ธฐ ๊ฐ๋ฅ)
sshํค ํ์ธํ๊ธฐ
cat ~/.ssh/id_rsa.pub
์ ๋ช ๋ น์ด๋ก ๋์จ ํค๋ฅผ GitHub์ ๋ฑ๋กํ๊ธฐ
Settings -> SSH and GPC Keys -> New SSH key -> Key ๋ถ๋ถ์ ์์์ ํ์ธํ sshํค ๋ณต๋ถํ๊ธฐ
๋ฐ์ํ