1Password / onepassword-sdk-python

MIT License
21 stars 5 forks source link

pip install fails on Windows #63

Open DanielCaveSophos opened 3 weeks ago

DanielCaveSophos commented 3 weeks ago

Pip installation fails on Windows device.

I have the latest version of pip, I have confirmed I can ssh to github (though this should not be a requirement if installing via pip). Can you review and comment on why this is failing?

pip install git+ssh://git@github.com/1Password/onepassword-sdk-python.git@v0.1.0-beta.9
Collecting git+ssh://****@github.com/1Password/onepassword-sdk-python.git@v0.1.0-beta.9
  Cloning ssh://****@github.com/1Password/onepassword-sdk-python.git (to revision v0.1.0-beta.9) to c:\users\ExampleUser\appdata\local\temp\pip-req-build-j2p3bcwt
  Running command git clone --filter=blob:none --quiet 'ssh://****@github.com/1Password/onepassword-sdk-python.git' 'C:\Users\ExampleUser\AppData\Local\Temp\pip-req-build-j2p3bcwt'
  git@github.com: Permission denied (publickey).
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.
  error: subprocess-exited-with-error

  × git clone --filter=blob:none --quiet 'ssh://****@github.com/1Password/onepassword-sdk-python.git' 'C:\Users\ExampleUser\AppData\Local\Temp\pip-req-build-j2p3bcwt' did not run successfully.
  │ exit code: 128
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet 'ssh://****@github.com/1Password/onepassword-sdk-python.git' 'C:\Users\ExampleUser\AppData\Local\Temp\pip-req-build-j2p3bcwt' did not run successfully.
│ exit code: 128
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
MOmarMiraj commented 2 weeks ago

Hello @DanielCaveSophos

Sorry to hear that your having this issue and thanks for bringing it up! This issue is due to GitHub not allowing anonymous clones via SSH, if you are using any git commands, you need a registered SSH key. Heres the guide on how to add a new SSH key to your GitHub. https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account?tool=webui

You could also try doing a pip install with HTTPS as I believe you don't need to authenticate with HTTPS.

This would be the command you would run: pip install git+https://git@github.com/1Password/onepassword-sdk-python.git@v0.1.0-beta.9

Let me know if you have any more questions!