/.ssh/config gitlab
1041 ワード
gitlabにsshのpublic keyの設定したあと,cloneしようとすると以下のようなエラーがでた
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
私の場合(/.ssh/configにHost githubと書くのは間違い)で指摘されているように,ssh configの書き方が良くなかったようです.
~/.ssh/config
を以下のように書き直すことで解決した
Host gitlab.com
User git
IdentityFile ~/.ssh/id_rsa <- your key path
TCPKeepAlive yes
IdentitiesOnly yes
おわり
おまけ
SSH Key作成コマンド
ssh-keygen -t rsa -C "[email protected]"
接続テスト
ssh -T [email protected] -i ~/.ssh/id_rsa
Author And Source
この問題について(/.ssh/config gitlab), 我々は、より多くの情報をここで見つけました https://qiita.com/stackdays/items/f91503126634d8660746著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .