git을 사용할 때 원격 저장소에 push 하는 등 접근할 때 아이디와 비번(또는 토큰)이 필요한데요, 기본적으로 git은 입력했던 아이디와 비밀번호를 저장하지 않아 매번 repository에 접근할 때마다 아이디와 비밀번호(또는 토큰)를 요구합니다.

$ git push
Username for '<https://github.com>': John
Password for '<https://[email protected]>':
#...

$ git push
Username for '<https://github.com>': John
Password for '<https://[email protected]>':
#(반복)

그래서 git은 1.7.9 버전 이후 부터 credential 정보를 손쉽게 캐싱해주는 credential helper 옵션을 제공합니다. 기본값으로는 credential helper 가 설정되지 않아 매번 인증정보를 입력해 주어야 하는데, 메모리나 디스크, 맥이라면 키체인(osxkeychain)에 인증정보를 캐싱하도록 설정해보겠습니다.

git 인증정보 캐시 설정 방법