"fatal: detected dubious ownership in repository"でハマった
環境
gitサーバー:OMV7,git用ユーザーとしてgit_userを作成
クライアント:debian,tekkamelonでログイン
git clone ssh://git_user@hogeでclone
クライアントからgit fetchしようとすると以下のエラーが発生した
code:sh
fatal: detected dubious ownership in repository at '/hoge'
To add an exception for this directory, call:
git config --global --add safe.directory /hoge
で,指示通りにgit config --global --add safe.directory /hogeを実行しても変わらない
所有権の問題かと思いsudo chown tekkamelon:tekkamelon /hogeを実行しても変化なし
結局git clone ssh://tekkamelon@hogeでcloneし直すと正常に動作した
.git/configのurl = を書き換えてもOK
どうもこれへの対処らしい
#git #備忘録