https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/

최근 깃헙 인증 방식이 바뀌어서 SSH 로 인증하려고 했음

결과적으로 로컬 유저와 리모트 유저가 다른 유저 권한으로 저장소에 액세스 하는 문제가 생김

 

해결책은 SSH 키에 -C 옵션과 config 파일을 설정함으로써 해결

ssh-keygen -t rsa -C "github_email_address"

config 파일 내용은 다음과 같음

Host github.com-ke2ek
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_rs

그리고 push 하기 전에 global 설정으로 유저이름과 메일을 설정해주어야 함

git config -l --global 로 확인해보면 다음과 같다. 향후 https 접근을 모두 ssh 로 바꿔주기

url.git@github.com:ke2ek.insteadof=https://github.com/ke2ek
user.name=사용자 이름
user.email=깃헙 메일

 

'Note' 카테고리의 다른 글

자주 사용하는 git 명령어  (0) 2021.02.27
동적 라이브러리 경로 변경  (0) 2019.07.24
[Linux Debugger] strace  (0) 2019.07.03
[linux] python wsgi server, db 배포 이후 (운영, 관리)  (0) 2019.07.01
오픈소스 가이드  (0) 2019.06.30

+ Recent posts