0
0

WSL上で[safe] directory = %(prefix)///wsl....を設定しても、fatal errorが出てしまう

Posted at

当方Windows11を使用しています。
Source treeを使いたく、wsl上にgit cloneしたものをgitconfigへ設定しようとしていたのですが

fatal: detected dubious ownership in repository at (省略)
To add an exception for this directory, call:
git config --global --add safe.repository '%(prefix)///wsl.localhost/Ubuntu/home/username/repository_name

とエラーが出るばかりで上手くいきませんでした。

ubuntu上でvimを使って設定したり、git config --global --add safe.repository '%(prefix)~~を打ち込んだりしていました。

結論ubuntu上で触っていたのがよくなかった....

解決策

Source Treeのターミナルから設定したら上手くいきました。

そもそもSource Treeはwindows側の設定を見に行くらしい。サーチ不足でした。

0
0
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
0
0