Others/Git
[Git] password 없이 쉽게 세팅하기
SweetDev
2021. 10. 13. 02:05
먼저 시도해볼 방법
git remote set-url origin https://YOURUSERNAME@github.com/USERNAME/REPOSITORY.git
이걸로 remote url을 바꿔본다. 안된다면 밑의 방법을 사용해보자!
SSH Key를 이용해서 하는 방법!!!
1. 아래 명령어로 ssh key 생성
$ ssh-keygen
나머지 줄은 엔터 쳐서 생성하면
2. ssh-key 복사 (id_rsa.pub 확인)
$ cat ~/.ssh/id_rsa.pub
* 꼭 .pub을 써줘야하는 것 같다. 안써주니까 다른 파일이 나왔다!
3. github 키 등록
profile>settings>SSH and GPG keys > New SSH key 클릭
==========
+) profile이 없다는 메세지가 나올 때
git config --global user.name "홍길동"
git config --global user.email "support@webisfree.com"
==========
+) 삽질:
Personal Access Key를 사용하는게 훨씬 쉬워보여서 얘를 시도해봤는데
https://velog.io/@shin6949/Github-Token-방식으로-로그인하기-ch3ra7vc
발급까지는 쉬웠는데 비밀번호 넣는 항목이 잘 안보여서 실패...
출처
https://wotres.tistory.com/entry/Error-Permission-denied-publickey-github-에러-해결법