秘密鍵「id_rsa_my_gitlab」を登録します。
ssh-add ~/.ssh/id_rsa_my_gitlab
authentication agentを起動してあげましょう
eval "$(ssh-agent)"
次のコマンドで接続のテストが行えます。
ssh -T git@gitlab.com
これでうまくいけばOKです。
vi ~/.ssh/config
# Gitlab
Host gitlab
User git
Port 22
HostName gitlab.com
IdentityFile ~/.ssh/id_rsa_my_gitlab
TCPKeepAlive yes
IdentitiesOnly yes
もちろんパーミッションは 0600 で!
これで
ssh -T gitlab
でテストして接続できればokです