728x90

우분투 터미널 환경에서 깃허브 커밋하고 푸시할 때

1. 

git init

현재 폴더를 로컬 저장소로 지정

 

2.

.gitignore 파일 생성

모듈들이 커밋안되게 방지 

안에 (node_modules)

 

3.

git status

로컬 저장소의 현재상태확인

빨간 글씨체로 보여지는 파일목록은 추적되지 않은 파일들(Untracked files)

추적되지 않은 파일이란, 준비 영역이나 로컬 저장소에 한번이라도 add되거나 commit되지 않은 파일을 말한다.

반대로 추적 상태인 파일들(Tracked files)은 최소한 한번은 git add 명령을 통해 준비 영역에 포함되거나 commit을 통해 로컬 저장소에 저장된 파일이다.

4.

git add .

git add는 특정 파일만 업로드하고자 할 때 사용한다.

 

git add "파일명"



 

5. 로컬 저장소에 최종저장하는 단계

 git commit -m "메세지"

 

6. 로컬 저장소와 원격저장소를 연결

git remote add origin Git Repository 주소

*origin은 별칭이다.

 

7. 별칭내역을 확인

origin의 별칭으로 등록된 원격 저장소를 확인할 수 있다.

 

 git remote -v

 

 

8. 로컬 저장소의 파일들을 원격 저장소로 올린다.

 

git push origin master




 

 

이렇게 나옴

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/jsoyun/blockchain.git/'

 

그래서 찾아보니까 

 

Settings / Developer settings/Personal access tokens / Generate new token / Token 설정

으로 들어가서

 

토큰 비번을 만들어서 

비번에 넣어주니까 되더라 

 

 

 

 

 

출처:

 

에러시 이거

https://hyeo-noo.tistory.com/184

 

[Mac] GitHub push token 오류 해결

Github 오류 7.29일 새벽 갑자기 git push가 안 되는 현상을 겪었다. 오류의 첫 줄이 무슨 말이냐면 Password 인증방식이 일시적으로 brownout(shutdown?)되었다. Password 대신에 personal access token을 사용..

hyeo-noo.tistory.com

https://shxrecord.tistory.com/179 [두-번째저장소]

https://codecoco.tistory.com/74?category=512233 

728x90

+ Recent posts