지역 저장소
> git init
> git config user.name "깃허브 아이디"
> git config user.email "깃허브 등록 이메일"
> git add README.md
> git commit -m "저장소 설명 추가"
> git branch -M main
> git log # 확인 가능
원격 저장소
> git remote add origin 경로
> git push origin main
이런 식으로 하면 원격저장소가 등록되어야 하지만?
에러가 났다.
토큰은 깃허브에서 발급받은 상태!
https://velog.io/@miyoni/remote-Invalid
해당 벨로그 참고해서 해결했다.
origin을 제거한 후, 다시 추가하면 된다고 한다.
> git remote remove origin
그러고 나서 다시 등록을 하는데!
이번에는 토큰값도 같이 넣어서 입력을 한다.
> git remote add origin https://닉네임:토큰@github.com/repository 경로
# 예
> git remote add origin https://gildong:tokenpassword@github.com/gildong/index.git
이런 식으로 입력한 후 다시 푸시를 하면 정상적으로 원격 저장소에 등록된 걸 알 수 있다.
@ 골뱅이 뒤에는 https://를 제외한 github 경로를 위 경로 그대로 입력하면 됨.
300x250
'SOMEDAY > NEED' 카테고리의 다른 글
[UBUNTU] 우분투 톰캣8 war 파일 실행 (0) | 2023.09.08 |
---|---|
[ERROR] UBUNTU tomcat ./start.sh > This file is needed to run this program (0) | 2023.09.07 |
[SPRING] further occurrences of HTTP request parsing errors will be logged at DEBUG level. (0) | 2023.09.05 |
[IntelliJ] 인텔리제이 usages 해제 (0) | 2023.09.04 |
[ORACLE] DBeaver 에서 UPDATE 시 무한 로딩 오류 (0) | 2023.08.27 |