gitkraken 无法访问 www-data 文件

gitkraken fails to access www-data files

这是一个全新的 ubuntu 设置,也许我错过了什么。 我克隆了一个我正在使用 Laravel 进行的项目并创建了权限文件夹。

$ cp .env.example .env
$ composer install
$ sudo chown -R www-data:www-data ~/Projects/my-project/storage
$ sudo chown -R www-data:www-data ~/Projects/my-project/vendor
$ sudo chown -R www-data:www-data ~/Projects/my-project/boostrap/cache

至此,一切正常,除了 git 这 3 个文件夹。 由于 git 不是 www-data 用户,我已将我的用户 "clement" 添加到 www-data 组

$ sudo usermod -aG www-data clement
$ groups clement
clement : clement adm cdrom sudo dip www-data plugdev lpadmin sambashare

现在,我可以在命令行

中使用git毫无问题地工作
clement@clement-ubuntu:~/Projects/my-project$ touch storage/test
clement@clement-ubuntu:~/Projects/my-project$ git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        storage/test

nothing added to commit but untracked files present (use "git add" to track)

但是,同样 运行 在 "clement" 下的 Gitkraken 仍然表现得好像用户不是 www-data 组的一部分。

它没有看到文件 storage/test 并尝试删除存储中的所有 .gitignore 和 bootstrap/cache 因为它没有看到它们

我已经重新安装了 gitkraken 并重新克隆了项目,但问题仍然存在。

我从支持那里得到了答复,现在可以使用了:

Thanks for reaching out to support! It looks like GitKraken needs the Owner of the file to be the user that is running GitKraken. Would it work to use clement:www-data for the owner permissions?

$ sudo chown -R clement:www-data my-project

来自 GitKraken 的 Ryan,如果您阅读了本文,再次感谢您!