GitLab 원격 : HTTP 기본 : 액세스 거부 및 치명적 인증
이 게시물과 달리 Mac OS를 사용하고 있습니다.
GitLab에 비밀번호가 구성되어 있습니다.
프로젝트가 GitLab에서 작성된 후에 SSL 키가 생성되었습니다.
새 프로젝트에 기존 폴더를 사용할 때 아래 단계를 수행하십시오.
기존 폴더
cd existing_folder
git init
git remote add origin https://gitlab.com/sobopla/Geronimod.git
git add .
git commit -m "Initial commit"
git push -u origin master
GitLab 사용자 이름과 비밀번호를 입력하라는 메시지가 표시됩니다. 비밀번호를 입력하면 다음을 얻습니다.
원격 : HTTP 기본 : 액세스 거부 치명적 : ' https://gitlab.com/myname/myproject '에 대한 인증 실패
Windows 암호를 변경해야 할 때마다 발생하며 위의 답변 중 어느 것도 도움이되지 않았습니다.
나에게 맞는 솔루션을 아래에서 시도하십시오.
Windows 자격 증명 아래에서 git 항목을 편집하려면 Windows 자격 증명 관리자 (Windows 키를 누르고 'credential'을 입력)로 이동하십시오. 기존 비밀번호를 새 비밀번호로 바꿉니다.
git config --system --unset credential.helper
그런 다음 Git 원격 서버의 새 비밀번호를 입력하십시오.
같은 오류가 발생하여 다음과 같이 해결했습니다.
cmd에서 명령 적용
git config --system --unset credential.helper
위의 명령을 실행하면 다른 오류가 발생합니다.
오류 :
could not lock config file C:\Program Files\Git\mingw64/etc/gitconfig: Permission denied
그런 다음 C : \ Program Files \ Git \ mingw64 / etc / 위치 에서 gitconfig 파일을 제거했습니다 (참고 :이 경로는 "/ Users / username"과 같이 MAC에서 다름)
- 그 후
git pull
orgit push
같은 git 명령을 사용 하면 사용자 이름과 비밀번호를 묻습니다. 유효한 사용자 이름과 암호를 적용하고 git 명령이 작동합니다.
이것이 도움이되기를 바랍니다 ...
나를 위해 다음이 효과가있었습니다.
GitLab 비밀번호를 사용하지 말고 액세스 토큰을 만들어 비밀번호 대신 사용하십시오.
- GitLab에서 설정 > 액세스 토큰으로 이동하십시오.
- 새 토큰 만들기 ( api 확인 )
- 자식 복제 ...
- 비밀번호를 묻는 메시지가 표시되면 GitLab 비밀번호 대신 액세스 토큰을 복사하여 붙여 넣습니다.
나를 위해 일한 유일한 방법 https://username:Password@gitlab.com/user/projectgit
대신을 사용 했습니다 https://gitlab.com/user/projectgit
. 참조 https://gitlab.com/gitlab-com/support-forum/issues/1654를
Windows 자격 증명 아래에서 git 항목을 편집하려면 Windows 자격 증명 관리자 (Windows 키를 누르고 'credential'을 입력)로 이동하십시오. 기존 비밀번호를 새 비밀번호로 바꿉니다.
git> 2.11을 사용하고 Kerberos를 사용하여 Gitlab과 상호 작용하는 경우 remote: HTTP Basic: Access denied
오류 를 피하기 위해 로컬 git에서이 구성을 설정해야 합니다.
$ git config --global http.emptyAuth true
나는 또한 같은 문제에 직면했다. 문제의 원인은 인증 오류였습니다. 이 문제를 해결하려면 제어판-> 자격 증명 관리자-> 일반 자격 증명으로 이동 하여 gitlab 자격 증명을 찾아 편집하십시오. 아이디 비밀번호가 올바른지 확인하십시오
관리자 권한으로 명령 프롬프트를 연 다음이 명령을 실행하십시오.
git config --system --unset credential.helper
도메인 앞에 사용자 이름을 추가하십시오.
https://**username**@gitlab.com/user/projectgit
그리고 조수가 비밀번호를 묻습니다.
참고 : GitLab SSL 설정 과 GitLab SSH 키를 혼합하지 마십시오 .
If what you have configured in your GitLab profile is an SSH public key, then your HTTPS URL would not use it.
Regarding your HTTPS credentials, double-check:
- if the two-factor authentication is disabled, or
- if you have special characters in your username or password, or
- if you have a Git credential helper:
git config credential.helper
.
Try this:
- Go to:
C:/Users/(YourUserName)/
- Delete file
.gitconfig
There are two ways I got around this problem:
I added my username to the front of the remote URL (https://username@gitRepoURL)
- Not always the best solution; where I work, even though we're slowly moving towards using GIT, we have our applications on a network drive, so if I do this, only I can push changes even if someone else worked on a feature.
I can't run
git config --system --unset credential.helper
from GIT Bash, so I had to open up an Admin Command Prompt and run it there (this assumes you installed GIT such that it can run from both GIT Bash and the Command Prompt). From Bash, I get a "could not lock config file" error.
Well, I faced the same issue whenever I change my login password.
Below is the command I need to run to fix this issue:-
git config --global credential.helper wincred
After running above command it asks me again my updated username and password.
Hoping this will help you :)
It happens if you change your login or password of git service account (GitHub or GitLab, Bitbacket, etc). You need to change it in Windows Credentials Manager too.
So, type "Credential Manager" (rus. "Диспетчер Учетных Данных") in Windows Search menu and go to your git service account and change data too.
In my case I reinstalled to the latest version of git (currently 2.16.2). I don't know if it was that my old version of git was outdated, but I read on a github page that this should be done if you stumble into https cloning errors. I figured it was an https cloning error as the error focuses on HTTP Basic
, while GitLab uses HTTPS
. I might be wrong in this thought process, but the solution helped in my case, and I hope this helps anyone in the future!
GO TO C:\Users\<<USER>> AND DELETE THE .gitconfig file
then try a command that connects to upstream like git clone, git pull or git push
. You will be prompted to re-enter your credentials. Kindly do so.
Go to Control Panel->Credential Manager->Windows Credentials select github or gitlab credentials and modify it. This is for windows10
it worked for me: I use Mac and I wrote the path on finder:
~/Library/Application Support/SourceTree
I deleted the auth file which should be like
yourUserName@STAuth-gitlab.yourAdress
then tried to push and pull the code from the source tree and it worked.
You can also read the following answers:
i removed gitlab credential from 'Credential Manager' in windows and pushed successfully
So for me the problem was that I had created my GitLab account via linking my GitHub account to it. This meant that no password formally existed for the account as it was created via hotlink between GitHub and GitLab. I fixed it by going to GitLab Settings -> Password -> and writing the same password as my GitHub account had.
I tried with browser URL for the repository then
git clone $(browserURL)
it prompted for my username and then my password
It worked fine then
If your trying to login Gitlab with your existing Git account. You need to reset your password of Gitlab, for the first time.
- Step: Navigate to setting by clicking your profile icon( drop down menu on top right corner).
- Step: Go to settings
- Step: Click on the lock icon or glyphicon icon(i.e password).
- Step : Enter the new password for Gitlab.
None of the above solutions worked for me and I don't have admin rights on my laptop, but they eventually led me to the git tools credential storage doc :
My setup Windows 10 | git version 2.18.0.windows.1 | Clone through HTTPS link
This solution works if you use wincred as credential helper :
> git config --global credential.helper
wincred
Changing the helper to "cache" should do the trick, as it will ask you to provide your credentials again. To set it to cache, just type :
> git config --global credential.helper cache
Check your update is active:
> git config --global credential.helper
cache
You should now be able to clone / pull / fetch as before.
When the Windows Credential Manager asks for your credentials to access GitLab, those are username and password you use when accessing GitLab. EG: use your email and password.
When I had the same problem,
I solved it by removing the file "passwd" in
C:\Users\<USERNAME>\AppData\Local\Atlassian\SourceTree
After removing Sourcetree will prompt for the password.
Note:
OS Version : win10
Sourcetree Version: 3.1
go to credential setting on your windows computer and Remove https://gitlab.com/sobopla/Geronimod.git
For Mac user:
- Go to keychain and delete gitlab accounts
- Go to your project path in terminal and simply type git pull
- Then you will be asked for username and password for gitlab
- Enter your username which you will find out in gitlab account in profile section.
- Then after that enter you updated password here.
- Here we go, again try to push your code, it may help you guys.
Create a new access token from gitlab ->setting --> access token
Same problem with Sourcetree On Mac
Solution: Delete the password in keychain access.
'development' 카테고리의 다른 글
PHP 부분 문자열 추출. (0) | 2020.06.08 |
---|---|
조건문을 단축하는 방법 (0) | 2020.06.08 |
RMagick 2.13.1을 설치할 수 없습니다. (0) | 2020.06.08 |
제약이있는 전문화 (0) | 2020.06.08 |
두 가지 일반 유형으로 하나의 인터페이스를 구현하는 Java 클래스를 작성하는 방법은 무엇입니까? (0) | 2020.06.08 |