Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Spring Boot
- Camera Movement
- unity
- server
- rpg server
- draganddrop
- express
- Camera Zoom
- Digital Ocean
- Unity IAP
- --watch
- spread 연산자
- critical rendering path
- screencapture
- MySQL
- Git
- Packet Network
- nodejs
- OverTheWire
- Google Developer API
- springboot
- react
- Google Refund
- SDK upgrade
- Unity Editor
- linux
- css framework
- java
- mongoDB
- docker
Archives
- Today
- Total
우당탕탕 개발일지
[Git] access token 이 변경되었을 때 재로그인 하는 방법 ( authentication fail) 본문
로컬의 원하는 git 프로젝트 경로로 들어가서 다음을 입력
git credential-osxkeychain erase ↵
host=github.com ↵
protocol=https ↵
하고나서 다시 git push ~~ 를 하면 다시 계정과 비밀번호(personal access token)을 입력하라고 나온다
++ git 레포지토리를 연결한 후 pull 을 하려하는데, 매번 할때마다 id와 accesstoken을 입력해야 하는 문제가 발생함. 위 사이트를 참고해서 토큰을 기억할 수 있게끔 진행하려함.
1. credential-osxkeychain 이 설치되어있는지 확인하고 설치되어있지 않다면 설치하기. (homebrew 설치까지)
git credential-osxkeychain #credential-osxkeychain 이 설치되어있는지 확인 . 설치되어있지 않다. 우선 homebrew 부터 설치하자
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ## homebrew 사이트에 들어가면 복사가능한 설치명령문구. 그런데 다음과 같은 에러 발생
## dont run this as root !
## 에러발생. 다른 계정을 만들어서 설치해야한다는 말 같다.
##rina라는 계정을 만들어서 해당 계정에 접속, homebrew를 설치할 예정.
adduser rina #유저추가
chmod 740 /etc/sudoers #root 계정에서 해당 파일을 수정할 수 있도록 권한부여
vi /etc/sudoers
#파일을 연 뒤 root ALL=(ALL:ALL) ALL 아래에 rina ALL=(ALL:ALL) ALL 을 추가한다.
chmod 440 /etc/sudoers #변경한 후 원상복구 해준다
su rina #유저변환
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" #homebrew 설치
#next step 이라고 안내 나올경우 따라해줘야함.
#다음부터 접속할땐 이 계정으로 접속하도록 하자.
#credential-osxkeychain 설치
brew install git
brew tap microsoft/git
설치가 완료되면, git 전역설정으로 인증처리에 osxkeychain을 사용하겠다고 지정한다. 이렇게 해두면 osx의 안전한 보안 정보 저장소인 키체인에 인증정보를 보관하고 사용하게된다. 최초로 인증이 필요한 github에 접근하면 id/passwd를 입력하게 되고, 이 정보가 키체인에 보관되어 다음부터는 자동으로 인증하게끔 한다.
git config --global credential.helper osxkeychain
참고사이트)
'ETC' 카테고리의 다른 글
[Linux] OverTheWire Lv0 ~ Lv10 (0) | 2024.03.17 |
---|---|
[Kali] Docker 에 kali linux 설치하기 (0) | 2024.03.15 |
[Flutter] MAC에서 Flutter 를 설치해보자 (0) | 2023.07.26 |
[Git] 깃 기능 정리 (1) | 2023.07.05 |
[JAVA] POI 를 이용하여 .xlsx 관리하기 - Read (0) | 2023.07.05 |