https://github.com/nxrxka/123.git에 master branch 생성하고  apex (현재 프로젝트 폴더) Push

-에러나면 대용량 파일 잠시 옮겨 놓기 …-

 

경로 이동 : [사용자]@SangKyeongui-MacBookAir [업로드 대상 프로젝트] % 

 

sangkyeongyun@SangKyeongui-MacBookAir apex % git init  

sangkyeongyun@SangKyeongui-MacBookAir apex % git status            

sangkyeongyun@SangKyeongui-MacBookAir apex % git add .             

sangkyeongyun@SangKyeongui-MacBookAir apex % git commit -m "commit"

sangkyeongyun@SangKyeongui-MacBookAir apex % git remote add origin  https://github.com/nxrxka/123.git

sangkyeongyun@SangKyeongui-MacBookAir apex % git remote -v

sangkyeongyun@SangKyeongui-MacBookAir apex % git push -u origin +master

 

 

 

그럼 이런식으로 branch가 새로 생성되고 프로젝트가 올라감

 

 

 

'IT' 카테고리의 다른 글

[Github] Push 하기  (0) 2024.06.30

 

- macOS 14.5(23F79) 기준 -

 

 

내 첫 티스토리 글이 깃허브 푸시 라니 ..

이번 게시글은 맥북에서 깃허브 푸시하다가 겪은 시행착오를 정리한 글이다.

다음에 또 비슷한 오류가 생기면 참고할 수 있지 않을까..생각하며..

 

 

일단 깃허브에 들어가서 내 프로젝트를 저장할 레포지토리 하나를 생성해준다. (Add a README file은 체크 X)

 

그러면 이런식으로 아주 친절하게 푸시하는 방법을 알려준다.

이걸 이제 그대로 터미널에 입력하면 되는데 . . 그래.. 따라해보자.

 

음 여기까진 오케이~ 이제 마지막 명령어가 남았군! 푸시를 해볼까~ 

 

 

음??

제발.. 왜. 한번에 되는게 없냐구~

 

쓋.. 깃허브 유저 이름이랑 패스워드 입력하라며!!!!!!!

remote: Support for password authentication was removed on August 13, 2021.

remote: Please see https://docs.github.com/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.

fatal: Authentication failed for 'https://github.com/nxrxka/KakaoLogin.git/'

 

 

이런 개같은 오류가 뜬다. 2021년부터 패스워드 인증 방식을 지원하지 않는다는 소린데 .. 그러면 Password for 어쩌구 하면서 왜 패스워드를 입력하라함? 아니 그래서 웹 서핑을 해보니까, 패스워드 대신에 깃허브에서 발급받은 토큰을 대신 입력해야한다는 것임

아니 그럼 Token for~ 이라고 띄워줘야지!! 하.. 암튼간에 토큰을 발급받아보자.

 

 

 

토큰 받는 과정은 깃허브 프로필 클릭 > Settings > Developer settings

 

 

여기서 뭐 체크 하면 간단하게 생성됨. 근데 Fine-grained tokens말고 꼭 Tokens(classic)에서 해야됨

Fine-grained tokens로 발급된 토큰 쓰거나 뭐 비번 틀리면 이상한 오류뜸..;; (사실 사용법 모름)

remote: Permission to nxrxka/KakaoLogin.git denied to nxrxka.
fatal: unable to access 'https://github.com/nxrxka/KakaoLogin.git/': The requested URL returned error: 403

 

 

 

아무튼 classic 토큰 발급 받으면 이런식으로 뜨는데 꼭 캡처나 메모장에 기록해놔야댐 .. You won't be able to see it again!

 

아무튼 이 발급 받은 키를 복사해서 패스워드란에 입력하면~   푸시 성공 ! 

결론 : git push 할때 패스워드 말고 토큰을 입력하라

 

 

만약에 여기서 또 오류가 생긴다 하면 키체인 접근 > "git" 검색 후, 관련 암호 모두 삭제하고 다시 도전해보세요 ,,,

(git remote rm origin 하고 첨부터 다시 도전)

 

 

 

그럼 다들 즐거운 깃허브하세요~

 

 

'IT' 카테고리의 다른 글

[Github] 기존 프로젝트에서 branch 생성 후 Push  (0) 2024.07.29

+ Recent posts