LoginSignup
1
0

More than 3 years have passed since last update.

warning: unable to access '/Users/xxx/.config/git/ignore': Permission denied

Posted at

flutterで作成したアプリをGitHub Pagesに公開しようとしたらタイトルのようなエラーがでた。

こちら:stackoverflow: Unable to access 'git/attributes'を参考に解決することができたのでその記録。

原因は、ファイルの所有権限が何らかの原因によってuserからrootに変更されてしまったことに起因する様子。

まずは、実際にuserからrootに変更されてしまっているかを確認する。

$ cd ~/
$ ls -al

上記コマンドを打つと、ファイルがズラっと並ぶが、その中で.configファイルのところがrootになっていることに気づく。
スクリーンショット 2020-05-08 7.17.10.png

そしたら、

sudo chown -R $(whoami) .config

のコマンドで、.configファイルの所有権限を現在のユーザー名に変更する。

uploading-0

変更できた。

無事アップロード成功。
めでたしめでたし。

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