Created
October 14, 2014 16:51
-
-
Save gskielian/b3f165b9a25c79f82105 to your computer and use it in GitHub Desktop.
Specifying SSH Key within Git Clone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#how to specify an ssh key to use when cloning a repo in Mac | |
ssh-agent bash -c 'ssh-add /Users/UR_USERNAME/.ssh/UR_PRIVATE_KEY; git clone git@DAS_GIT_URL' | |
GIT_SSH_COMMAND=
works great. The only thing to be mindful is that you need git version > 2.3.0
On CentOS 7, you can upgrade git as below
# yum remove git*
# yum -y install https://packages.endpoint.com/rhel/7/os/x86_64/endpoint-repo-1.7-1.x86_64.rpm
# yum -y install git
GIT_SSH_COMMAND=
works great. The only thing to be mindful is that you need git version > 2.3.0On CentOS 7, you can upgrade git as below
# yum remove git* # yum -y install https://packages.endpoint.com/rhel/7/os/x86_64/endpoint-repo-1.7-1.x86_64.rpm # yum -y install git
Thanks! I was struggling with GIT_SSH_COMMAND on git 2.24.3 and you saved me
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this^ +1