LoginSignup
12
11

More than 5 years have passed since last update.

SSH接続できているのにgit cloneがうまくいかないのはファイルの権限が問題かも

Posted at

git clone
を実行した時に

$ git clone
fatal: could not create work tree dir '***': Permission denied

と表示されてしまう。
一番怪しいのはSSH接続がうまくいってないパターンなので確認。

$ ssh -T git@github.com
Hi ***! You've successfully authenticated, but GitHub does not provide shell access.

繋がっているようだ。
調べてみるとフォルダの権限が違うユーザ等になっているとcloneできないみたい。
以下コマンドで権限を変更。

chown 【ユーザ名】 【cloneで配置するフォルダ】

もう一度clone

$ git clone

でうまくできた。

12
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
11