Gitで.ssh/config設定してあるのにPullできない


[ec2-user@ip-10-x-x-x mnt]$ sudo git clone git@xxx.xxx.xxx.xxx:hoge/hoge.git
Cloning into ‘hoge’…
Permission denied (publickey).
fatal: Could not read from remote repository.

当たり前じゃん! .ssh/configを置いたのは ec2-user ユーザー側のホームでした・・・ sudoしたらroot側に必要になっちゃいますね。

きちんとchown/chmodしてディレクトリ作ってからcloneしないとダメってことで。

  
  • Good (0)
カテゴリー: 未分類 パーマリンク

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です