• 追加された行はこの色です。
  • 削除された行はこの色です。
#author("2023-10-26T09:53:23+09:00","default:ryuichi","ryuichi")
#author("2023-10-26T10:03:53+09:00","default:ryuichi","ryuichi")
* libgit2でnot owned by current userなエラーが出る [#ea642942]


** エラーの内容 [#r90ac9d5]
 fatal: unsafe repository ('C:/foo/bar is owned by someone else)
 To add an exception for this directory, call:
 
 git config --global --add safe.directory C:/foo/bar

- TortoiseGitで、WSL2上(または仮想環境上)のリポジトリを操作すると上のようなエラーが出ることがある

** 解決方法 [#h5ce27f4]

- (WSL2上ではなく)Windows上のシェルで上の'''git config --global --add safe.directory C:/foo/bar'''を実行するか、
- それでも上手くいかない場合は、C:\Program Files\Git\etc\gitconfigを管理者権限でエディタで開き、以下のような記述をする

 [safe]
    directory = *

** 参考 [#ab7bade1]
https://stackoverflow.com/questions/75878318/after-upgrade-getting-error-repository-not-owned-by-current-user


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS