git addをしようとした時に事件は起きた
新しくリポジトリを作ったので
・new repositoryの作成
・sshキーを作り登録
とか諸々を行なった上で
rails new hoge
してRails プロジェクトを作成
git add .
としたところ
warning: unable to access '/Users/myname/.config/git/ignore': Permission denied
warning: unable to access '/Users/myname/.config/git/attributes': Permission denied
と権限がないと怒られてしまった。
こちらを参考に~/.bashrc fileを編集したところ
warning: unable to access '/Users/myname/.config/git/attributes': Permission denied
のみのエラーになった。
このエラーがなかなか解決しなかったのですが、色々と探してみたところ
こちらのなかにある
sudo -u root -H env
を試したところ、エラーが消えました。
無事にadd commit pushまでできました。
うーん、なんだったんだろうか。権限問題。。