cli/cli

gh clone fails with permission denied, but git clone works (ubuntu 22 and snap version). Latest 2.47.0 works.

avertx opened this issue · 1 comments

Describe the bug

gh clone fails with permission denied, but git clone works

**UPDATE start **
the version here is both the latest in UBUNTU 22.04 and snap

latest 2.47.0 installed manually does not have the problem described.

** end UPDATE **

gh --version :

gh version 2.6.0-15-g1a10fd5a (2022-03-16)
https://github.com/cli/cli/releases/latest

Steps to reproduce the behavior

those ommands were executed seconds from eachother, no filesystem changes. Why one works, who knows.

Expected vs actual behavior

gh clone and git clone should behave the same

Logs


% gh repo clone user/repoo
fatal: could not create work tree dir 'repoo': Permission denied
exit status 128

% git clone git@github.com:user/repoo.git
Cloning into 'repoo'...
remote: Enumerating objects: 315, done.
remote: Counting objects: 100% (315/315), done.
remote: Compressing objects: 100% (140/140), done.
remote: Total 315 (delta 121), reused 290 (delta 97), pack-reused 0
Receiving objects: 100% (315/315), 5.16 MiB | 7.26 MiB/s, done.
Resolving deltas: 100% (121/121), done.
Updating files: 100% (136/136), done.

% gh --version
gh version 2.6.0-15-g1a10fd5a (2022-03-16)
https://github.com/cli/cli/releases/latest

I'm not sure exactly what your issue but we don't support snap installations because there are so many issues, sorry.