κ°μ
νΈμ€νΈμμ git pullμ νλλ°, λͺ»λ³΄λ λ©μμ§κ° λμ€λ©΄μ pullμ΄ λμ§ μμμ΅λλ€.
8μ 13μΌ λΆν°, ν¨μ€μλ μΈμ¦μ΄ νμ§λμλ€κ³ ν©λλ€. λμ μ νΌμ€λ μμΈμ€ ν ν°μ μ¬μ©νλΌλ λ©μμ§κ° λμμ΅λλ€.
[root@tkim.info tkim.info]# git pull
Username for 'https://github.com': crowdy@<mail address>
Password for 'https://crowdy<mail address>@github.com':
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: unable to access 'https://github.com/crowdy/tkim.info/': The requested URL returned error: 403
λμ
μ€λͺ λ λλ‘ personal access tokenμ μ¬μ©ν κΉ νλ€κ°, νΈμ€νΈμμλ deploy keyλ§ μμΌλ©΄ λκ² λ€ μΆμ΄μ deplot keyλ₯Ό μ€μΉνμ΅λλ€. λ°©λ²μ λ€μκ³Ό κ°μ΅λλ€.
ssh ν€ μμ±
ssh-keygen -trsa -b 4096 -C "{email}"
μ μ€ννκ³ μνΈλ₯Ό λΉμ λ‘λλ€.
μμ± ν .ssh ν΄λμμ id_rsa λ° id_rsa.pub νμΌμ΄ μμ±λ κ²μ λ³Ό μ μμ΅λλ€.
repoμ “ν€ λ°°ν¬” μ€μ μ ssh ν€ μΆκ°
cat.ssh/id_cat.pub
URL: https://github.com/ {user}/{repo}/keys/keysν΄λΌμ΄μΈνΈ μμ€ν μ gitssh ν€ μ€μ
Gitλ μΌλ°μ μΌλ‘ μ¬μ©μμ ν ν΄λ μλμ μλ .ssh/id_rsaμ μλ ssh ν€λ₯Ό μ¬μ©νλ―λ‘ λ¨Όμ μ¬μ©μμ ν λλ ν 리λ₯Ό μ°ΎμμΌ ν©λλ€.μλ₯Ό λ€μ΄ Ubuntu/Debianμμ κΈ°λ³Έμ μΌλ‘ μ¬μ©μ www-dataμ ν λλ ν 리λ /var/wwwwμ΄λ―λ‘ ssh ν€ νμΌμ /var/www/.ssh/id_rsa)μ λλ€.
κ·Έλ° λ€μ 1λ¨κ³μμ μμ±ν id_rsa νμΌμ ν΄λΉ λλ ν λ¦¬λ‘ λ³΅μ¬ν©λλ€.
λ€μμ ν΅ν΄ μ°κ²°μ ν μ€νΈν μ μμ΅λλ€.
sudo -u {user} ssh-T git@github.com
*Githubμ ν€λ₯Ό μλ €μ§ νΈμ€νΈμ λΆμ¬ν΄μΌ ν μ μμ΅λλ€.
λͺ¨λ κ²μ΄ μ μ§νλλ€λ©΄, λ€μκ³Ό κ°μ λ©μμ§λ₯Ό λ³Ό μ μμ΅λλ€.
Hi {user}! You've successfully authenticated, but GitHub does not provide shell access.
κ·ΈλΌ μ€λΉ μλ£!
μ£Όμ: reporturlμ΄ httpκ° μλ git νλ‘ν μ½μ μ¬μ©νλμ§ νμΈνμμμ€(μ¬μ©ν΄μΌ ν©λλ€.).
git@github.com:{user}/{repo}.git
μ΄ μλλΌ
https://github.com/{user}/{repo}.git
λ₯Ό μ¬μ©ν΄μΌ ν©λλ€.
λμ μ
ν€ μμ±
ν€λ₯Ό μμ±νλ λμμ λ€μκ³Ό κ°μ΅λλ€.
[root@tkim.info tkim.info]# ssh-keygen -t rsa -b 4096 -C "crowdy@<mail address>"
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:brsxqDZ0N5pIXuOV+61xjtGkzZ0lMiRlz/nIJmsTODg crowdy@<mail address>
The key's randomart image is:
+---[RSA 4096]----+
| o |
| o o . |
| . . + |
| . + . o |
| E.o * = o|
| o +o=. B O + |
| + =.*=o+ O o |
| =.+..+ O . |
| ... oo+.o |
+----[SHA256]-----+
[root@tkim.info tkim.info]# cat .ssh/id_rsa.pub
cat: .ssh/id_rsa.pub: No such file or directory
[root@tkim.info tkim.info]# cat $HOME/.ssh/id_rsa.pub
ssh-rsa <rsa string> crowdy@<mail address>
git pull ν μ€νΈ
[root@tkim.info tkim.info]# git remote -v
origin https://github.com/crowdy/tkim.info (fetch)
origin https://github.com/crowdy/tkim.info (push)
[root@tkim.info tkim.info]# git remote set-url origin git@github.com:crowdy/tkim.info.git
[root@tkim.info tkim.info]# git remote -v
origin git@github.com:crowdy/tkim.info.git (fetch)
origin git@github.com:crowdy/tkim.info.git (push)
[root@tkim.info tkim.info]# git pull
The authenticity of host 'github.com (52.69.186.44)' can't be established.
RSA key fingerprint is SHA256:<fingerprint string>.
RSA key fingerprint is MD5:<fingerprint bytes>.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,52.69.186.44' (RSA) to the list of known hosts.
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 18 (delta 13), reused 18 (delta 13), pack-reused 0
Unpacking objects: 100% (18/18), done.
From github.com:crowdy/tkim.info
0762ff5..f68e68a design -> origin/design
Updating 0762ff5..f68e68a
Fast-forward
docs/README_011_paypal.md | 12 ++++++++++
1 files changed, 208 insertions(+), 14 deletions(-)
[root@tkim.info tkim.info]#
github μμ νμΈ
μ¬μ©μ΄ νμΈλ deploy keyλ μ΄λ° λͺ¨μ΅μ νκ³ μμ΅λλ€.