티스토리 뷰
오류 발생
git clone을 받으려고 하는데 아래와 같이 오류가 발생한다.
remote: Invalid username or password.
원인
git 설정이 풀린 문제로 토큰과 연결하면 된다.
해결방법
github 에서 토큰을 발급 받아야한다.
이미 존재한다면 2번부터 실행하면 된다.
1. github -> Settings -> Developer settings -> Personal access tokens 메뉴에서 토큰 발급 받기
2. 초기화
yungyeong@yungyeongui-MacBookAir glasstint % git init
힌트: Using 'master' as the name for the initial branch. This default branch name
힌트: is subject to change. To configure the initial branch name to use in all
힌트: of your new repositories, which will suppress this warning, call:
힌트:
힌트: git config --global init.defaultBranch <name>
힌트:
힌트: Names commonly chosen instead of 'master' are 'main', 'trunk' and
힌트: 'development'. The just-created branch can be renamed via this command:
힌트:
힌트: git branch -m <name>
/Users/yungyeong/Project/glasstint/.git/ 안의 빈 깃 저장소를 다시 초기화했습니다
3. git 정보 등록
git remote add origin [git 주소]
4. 레파지토리 복제
git clone [new project url]
Username for 'https://github.com': [이름 입력]
Password for 'https://rachel@github.com': [1번의 토큰 입력]
새로운 회사를 다닐 때, 아니면 노트북을 포맷하거나 아이디를 회사계정, 개인계정을 여러개 쓸 때 자주 나올 수 있는 오류라고 생각한다.
'Git' 카테고리의 다른 글
[Github] Push main to origin/main was rejected by the remote (0) | 2024.02.13 |
---|---|
[Git] Resolve conflicts 버튼 비활성화일 경우 (0) | 2022.06.11 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 이븐아이부트캠프
- Git
- 알고리즘
- Spring
- 라라벨
- php
- 이븐아이부트캠프후기
- javascriptalgorithm
- 우아한형제spring
- RDS
- IntelliJ
- 프로그래머스알고리즘
- http
- 인프런spring
- homebrew
- laravel
- 프로그래머스코딩테스트
- phpstorm
- M1
- 프로그래머스
- 이븐아이후기
- nestjs
- 김영한spring
- MAC
- Sts
- IntelliJ말고spring
- javascript알고리즘
- html태그
- 인프런스프링mvc
- algorithm
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
글 보관함