This repository has been archived by the owner on Oct 20, 2023. It is now read-only.
Running gh net
elevated on macOS creates ~/.ssh
owned by root:staff
#59
Labels
bug
Something isn't working
Describe the bug
On a fresh macOS 13.4 user profile with no
~/.ssh
folder, installing and runninggh net
appears to create the following files owned byroot:staff
rather than the logged-in user:This causes issues for other apps - specifically, attempts to launch local Dev Containers in VS Code. Launching a Codespace in VS Code still works fine.
Fix is to revert the permissions
sudo chown -r "${USER}:staff" ~/.ssh
Reproduce steps
Steps to reproduce the behavior:
~/.ssh
folderbrew
brew install --cask visual-studio-code docker
)brew install gh
)gh extension install github/gh-net
)gh net
to provide local networking to the running codespacesudo ls -alir ~/.ssh
to see permissions are set toroot:staff
Expected behavior
~/.ssh
should not be owned by rootDesktop (please complete the following information):
Additional context
I'm assuming this is caused by
gh net
needing elevated access for networking, butGenerateSSHKey
in pkg/ssh/ssh_keys.go#L42 then assumes these privs when creating the directory and files.Raising this issue in github/gh-net rather than cli/cli since the root cause is the elevated privilege - but happy to report it upstream if that's better
The text was updated successfully, but these errors were encountered: