I'm trying to install the following private repository using poetry:
shared = { git = "git@github.com:MyOrg/py-shared.git", tag = "v1.0.1" }
However, when I do poetry install
, but when I do I get the following error:
Bad permissions. Try removing permissions for user: AzureAD\pf-admin (S-1-12-1-4251299626-1206025203-1262121600-3609005738) on file C:/Users/{ME}/.ssh/config. Bad owner or permissions on C:\Users\{ME}/.ssh/config
I'm not quite sure why I'm getting this error. I recognize pf-admin
as the administrator account I use for AAD work on the same machine, but it's not the I use for logging in and it's not associated with git or GitHub, so I'm not sure where this is coming from.
Looking at the SSH config, I see this:
Host bitbucket.org
AddKeysToAgent yes
IdentityFile ~/.ssh/bitbucket-key
but as this is intended for BitBucket, I'm not sure what it has to do with GitHub. Does anyone know how to fix this accutely obscure issue?
This error was the result of two, separate SSH issues.
The first was poorly managed permissions on my .ssh folder. As described in this answer, the admin account associated with my machine had elevated privileges (and actually, so did I), to the .ssh directory, causing SSH requests to fail. Removing full control from both the admin account and my own fixed this issue. After fixing this issue, poetry install
was giving me this:
git@github.com: Permission denied (publickey).
This issue, I tracked down to the way in which git was attempting to authenticate with GitHub. Essentially, because I was using a git@github.com
address, git was attempting to do SSH. As I didn't have an SSH key setup for my account, the request to poetry failed. Simply, following the guide here fixed my issue.