tools & libs/git

remote: HTTP Basic: Access denied

  • -
반응형

git clone 과정에서 기존에 사용하던 계정 정보와 다른 정보로 로그인 해야하는 경우 아래와 같이 접근 거부 오류가 발생한다.

 

> git clone https://gitlab.com/stgray22/ssafy_algo_basic.git c:\Users\student\git\algobasic\ssafy_algo_basic --progress

Cloning into 'c:\Users\student\git\algobasic\ssafy_algo_basic'...

remote: HTTP Basic: Access denied

fatal: Authentication failed for 'https://gitlab.com/stgray22/ssafy_algo_basic.git/'

 

어딘가에서 잘못된 계정 정보가 들어가서 그렇게 된듯 하다.

 

이때 관리자 권한으로 아래 명령을 실행한다.

 

git config --system --unset credential.helper

 

다시 clone을 시도하면 계정 정보를 다시 입력받고 clone이 성공적으로 진행된다.

 

단점은 이제 계속해서 계정을 물어본다.

 

C:\Users\student\git\ssafy_algo_basic>git pull
Username for 'https://gitlab.com': stgray22@gmail.com
Password for 'https://stgray22@gmail.com@gitlab.com':
Already up to date.

 

이제 다음에 입력한 값을 저장하도록 처리해보자.

 

git config credential.helper store

 

다시 한번 계정을 입력하면 이 후는 더이상 물어보지 않는다.

C:\Users\student\git\ssafy_algo_basic>git pull
Username for 'https://gitlab.com': stgray22@gmail.com
Password for 'https://stgray22@gmail.com@gitlab.com':
Already up to date.

C:\Users\student\git\ssafy_algo_basic>git pull
Already up to date.
반응형
Contents

포스팅 주소를 복사했습니다

이 글이 도움이 되었다면 공감 부탁드립니다.