Describe the bug
In a multi-user linux system it can be possible to have read permissions to all the files in a local git repo, but not write permission.
If I try view the issues for such a repository I get a permission error message that locking .git/config falied.
For git issue list the error is:
error: could not lock config file .git/config: Permission denied
git: exit status 255
For git issue view 1 the error is:
could not determine base repo: error: could not lock config file .git/config: Permission denied
git: exit status 255
gh version 1.0.0
Steps to reproduce the behavior
- Create a local repository that has a github repository as a remote
- Log in as another user that does not have write permissions to any of the files in the repository
- Try
gh issue list or gh issue view 1
- The permission error now appears
Expected vs actual behavior
I expected to be able to view the issue list or the issue itself because viewing does not modify anything.
Insead I got a permission error.
Logs
me@host:~$ cd /home/otheruser/somerepo
me@host:/home/otheruser/somerepo$ gh issue list
error: could not lock config file .git/config: Permission denied
git: exit status 255
me@host:/home/otheruser/somerepo$ gh issue view 1
could not determine base repo: error: could not lock config file .git/config: Permission denied
git: exit status 255
me@host:/home/otheruser/somerepo$ ls -ld .git/config
-rw-rw-r-- 1 otheruser otheruser 338 Mar 9 2017 .git/config
Only tested on linux:
$ uname -a
Linux hostname 5.4.0-26-generic #30-Ubuntu SMP Mon Apr 20 16:58:30 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Describe the bug
In a multi-user linux system it can be possible to have read permissions to all the files in a local git repo, but not write permission.
If I try view the issues for such a repository I get a permission error message that locking
.git/configfalied.For
git issue listthe error is:For
git issue view 1the error is:gh version 1.0.0
Steps to reproduce the behavior
gh issue listorgh issue view 1Expected vs actual behavior
I expected to be able to view the issue list or the issue itself because viewing does not modify anything.
Insead I got a permission error.
Logs
Only tested on linux: