[컴] Git Credential Manager

 

Git Credential Manager

Git Credential Manager 를 windows 에서 제공한다. linux 와 mac 버전은 아래 글을 참고하자. 글을 보면, Git Credential Manager 는 원래 MS에서 만든듯 하다.

GCM in WSL2

windows 에 GCM 을 설치하고, 이것을 wsl2 의 git config 에서 사용한다고 명시해 주면 된다.

MS에서 따로 되어 있던 GCM 을 하나의 source 로 합쳤다.

/usr/bin/git-credential-manager 을 만들고 chmod +x 를 해서 실행할 수 있게 하자.

# /usr/bin/git-credential-manager
#!/bin/sh
exec /mnt/c/Program\ Files\ \(x86\)/Git\ Credential\ Manager\ Core/git-credential-manager-core.exe $@

그리고 이것을 사용하도록 하자.

git config --global credential.helper /usr/bin/git-credential-manager

아래처럼 직접 설정을 할 때는 permission error 가 발생한다. 이건 필자의 기본계정이 일반유저이기 때문일 수도 있다.

git config --global credential.helper <windows_path>

Reference

  1. Using GitHub HTTPS Credentials in WSL 2 | Thursday Night

댓글 없음:

댓글 쓰기