Skip to content

Commit

Permalink
add .ssh/config entry for gitlab
Browse files Browse the repository at this point in the history
  • Loading branch information
the-gigi committed Mar 26, 2020
1 parent 2190ba2 commit 9ba15c7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions components/ssh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ mkdir -p ~/.ssh
# ssh-add key &> /dev/null
#done

# Create SSH config file for github
# Create SSH config file for github and gitlab (usingthe same key)
cat << EOF > ~/.ssh/config
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/github_id_rsa
Host gitlab.com
HostName gitlab.com
User git
IdentityFile ~/.ssh/github_id_rsa
EOF

# Make sure the SSH config file has the correct permissions
chmod 0600 ~/.ssh/config
chmod 0600 ~/.ssh/config

0 comments on commit 9ba15c7

Please sign in to comment.