Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poetry Install fails on remote shell using credssp #6496

Closed
3 tasks done
LevonW-IIS opened this issue Sep 13, 2022 · 7 comments
Closed
3 tasks done

Poetry Install fails on remote shell using credssp #6496

LevonW-IIS opened this issue Sep 13, 2022 · 7 comments
Labels
area/auth Related to the authenticator and keyring area/windows For Windows-specific issues kind/bug Something isn't working as expected status/duplicate Duplicate issues

Comments

@LevonW-IIS
Copy link

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: Windows 2022 Standard 64 bit 21H2
  • Poetry version: 1.2.0
  • Link of a Gist with the contents of your pyproject.toml file: pyproject.toml

Issue

I am trying to run poetry install from a remote session using CredSSP authentication, but poetry is running into an error. I have included the full output below with the -vvv flag on.

pwsh.txt

This fails with the error:
[WinError 1312] A specified logon session does not exist. It may already have been terminated.

To Reproduce:

  • ensure host and client are set up for winrm with credssp authentication
  • run the following commands:
$cred = Get-Credential
New-PSSession -Authentication Credssp -Credential $cred -ComputerName "HostNameOfRemoteComputer"
Invoke-Command -Session $s {cd location/of/test/project/toml ; poetry install -vvv}

Will try downgrade poetry and see if the issue persists and update this with the results of that test

@LevonW-IIS LevonW-IIS added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Sep 13, 2022
@LevonW-IIS
Copy link
Author

No issue running this on poetry 1.1.7. Works as expected.

@neersighted
Copy link
Member

Try setting PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring and report back, please.

@neersighted neersighted added area/windows For Windows-specific issues area/auth Related to the authenticator and keyring and removed status/triage This issue needs to be triaged labels Sep 13, 2022
@LevonW-IIS
Copy link
Author

Added in [Environment]::SetEnvironmentVariable("PYTHON_KEYRING_BACKEND", 'keyring.backends.null.Keyring', [System.EnvironmentVariableTarget]::Machine); to the powershell script but got the same error

@mhwaage
Copy link

mhwaage commented Sep 13, 2022

Added in [Environment]::SetEnvironmentVariable("PYTHON_KEYRING_BACKEND", 'keyring.backends.null.Keyring', [System.EnvironmentVariableTarget]::Machine); to the powershell script but got the same error

If you target Machine, the environment variable should not be visible until a new process spawns (c.f. examples in icrosoft's docs ); try targeting EnvironmentVariableTarget.Process instead.

@LevonW-IIS
Copy link
Author

That worked a treat, thanks. Should've spotted that one

@neersighted neersighted added the status/duplicate Duplicate issues label Sep 13, 2022
@neersighted
Copy link
Member

Duplicate #1917, then

Copy link

github-actions bot commented Mar 1, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/auth Related to the authenticator and keyring area/windows For Windows-specific issues kind/bug Something isn't working as expected status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

3 participants