git clone実行時にエラー「fatal: could not create work tree dir ‘xxx’.: ????????」が発生した場合の対処法
git clone実行時にエラー「fatal: could not create work tree dir ‘xxx’.: ????????」が発生したので、原因と対処法を記述してます。
環境
- OS centos7.7.1908
- git 1.8.3.1
エラー全文
git clone実行時に発生
git clone https://github.com/cezerin/cezerin.git cezerin
<出力結果>
fatal: could not create work tree dir 'cezerin'.: ????????
原因
文字化けして「?????」になっていてわかりずらいですが、cloneするディレクトリの権限の問題のよう。
対処法
ディレクトリに権限を付与する
sudo chown username /対象ディレクトリ
または、sudoを付けて実行する
sudo git clone https://github.com/cezerin/cezerin.git cezerin
-
前の記事
mac Finderを2つ以上のwindow(別ウィンドウ)で開く 2020.07.01
-
次の記事
vim 文字コードの確認方法 2020.07.02
コメントを書く