2022. 11. 2. 13:43

1. 사용자 버튼 누른 후 Settings 를 누른다

 

 

2. Personal access tokens - Fine grained tokens 버튼을 누른다

 

3. Generate new token을 누른다

 

4. Token name을 입력한다

5. Expiration 을 설정한다 최대 1년이다

6. Repository access를 설정한다

 - 개인적으로 Repository마다 다른 token으로 설정하기 위해 Only select repositories를 선택한다

 

7. Repository Permissions와 Account Permissions를 설정한다

- 무슨 항목인지 모르기 때문에 다 Read and Write로 설정했다

 

그냥 놔두고 No Access로 진행하면 아무 동작도 못하고 git init 도 막힌다

 

8. Generate token 버튼을 누른다

 

9. 생성한 token을 password로 입력한다

 

git clone "https://github.com/{name}/{repo_name}.git

 

Username for 'https://github.com': {name}

 

Password for 'https://{name}@github.com': 생성한 토큰 입력

 

현재 내 username은 다음 명령어로 확인할 수 있다

 

git config --list