반응형
Git 자격 증명 헬퍼(Credential Helper)란?
Git 자격 증명 헬퍼는 사용자의 자격 증명을 관리하여, 인증 과정을 간소화하는 기능입니다.
credential.helper 옵션 중 store는 자격 증명을 로컬 파일에 저장하는 방식으로 동작합니다.
- 주요 기능
- 자격 증명을 디스크에 저장.
- 이후 인증 시 저장된 자격 증명을 자동으로 사용.
- 저장된 자격 증명은 명시적으로 삭제하기 전까지 유지.
credential.helper store의 사용 방법
- 기본 설정
- --global
- 사용자 전체 설정. 현재 사용자에 대해 모든 Git 리포지토리에 적용.
- credential.helper store
- 자격 증명을 저장하고 필요 시 자동으로 사용.
- --global
- 처음 인증 시 자격 증명 입력
- Git이 원격 저장소와 통신할 때 사용자 이름과 비밀번호를 입력해야 합니다.
- 자격 증명 저장
- credential.helper store가 설정되어 있다면, 자격 증명이 ~/.git-credentials 파일에 저장됩니다.
- 이후 인증 과정 자동화
# credential.helper store를 설정
$ git config --global credential.helper store
# 처음 인증 시 자격 증명 입력
$ git push origin main
Username for 'https://github.com': your-username
Password for 'https://your-username@github.com': your-password
# 자격 증명 저장
## Linux/macOS: ~/.git-credentials
## Windows: %USERPROFILE%\.git-credentials
$ cat ~/.git-credentials
https://your-username:your-password@github.com
# 자격 증명 삭제
$ rm ~/.git-credentials
장점과 한계
- 장점
- 편리성
- 한 번 입력한 자격 증명을 기억하여, 반복적인 인증 과정을 제거.
- 한 번 입력한 자격 증명을 기억하여, 반복적인 인증 과정을 제거.
- 단순성
- 설정과 사용법이 간단하며, 초보자도 쉽게 적용 가능.
- 설정과 사용법이 간단하며, 초보자도 쉽게 적용 가능.
- 로컬 저장소 사용 가능
- 인터넷 연결이 없어도 동작.
- 인터넷 연결이 없어도 동작.
- 편리성
- 한계
- 보안 취약성
- 자격 증명이 암호화되지 않은 평문으로 저장
- 보안에 민감한 환경에서는 적합하지 않을 수 있음.
- 공유 환경 위험
- 공유 PC나 다중 사용자 시스템에서는 부적절하게 사용될 가능성.
- 보안 취약성
Git - git-credential-store Documentation
If not set explicitly with --file, there are two files where git-credential-store will search for credentials in order of precedence: ~/.git-credentials User-specific credentials file. $XDG_CONFIG_HOME/git/credentials Second user-specific credentials file.
git-scm.com
728x90
반응형
'Tip' 카테고리의 다른 글
[사업] 프리랜서 등 원천징수 3.3% 계산기 (국세, 지방세 계산기) (0) | 2025.03.10 |
---|---|
[화면보호기] 유휴 상태 시 보안 화면보호기 우회하기 (0) | 2024.12.20 |
[Colab] 공인 IP, Public IP 확인하기 (0) | 2024.12.06 |
할인율 계산기, 할인 계산기 (0) | 2024.11.29 |
[Unicode] 유니코드 200b(\u200b), Zero-Width Space란? (0) | 2024.11.27 |
[Docker] 구독/과금 플랜 정리 (0) | 2024.11.22 |
[Mac] Xcode license 동의하기 (git 등 사용 시) (2) | 2024.11.21 |
[Chrome] 24년도 Chromedriver 다운받기 (0) | 2024.11.20 |