I have an SSH connection from a Windows machine to another, and then trying to do a poetry install.
My problem is: I get this error when executing poetry install through ssh:
[WinError 1312] A specified logon session does not exist. It may already have been terminated.
This command works perfectly when I execute it locally on the target machine, but fails when connecting through ssh.
How can I get rid/fix the [WinError 1312]?
I saw another user that posted the same question recently, but removed it.
I've seen some clues regarding the MachineKeys, but have really no idea on how to proceed. Any suggestion will be highly appreciated.
Python: 3.10.8
Poetry: 1.2.1
Installing dependencies from lock file
Package operations: 5 installs, 0 updates, 0 removals
• Installing install-requires (0.3.0)
OSError
[WinError 1312] A specified logon session does not exist. It may already have been terminated.
at ~\AppData\Roaming\pypoetry\venv\lib\site-packages\win32ctypes\core\ctypes\_util.py:53 in check_zero
49│
50│ def check_zero_factory(function_name=None):
51│ def check_zero(result, function, arguments, *args):
52│ if result == 0:
→ 53│ raise make_error(function, function_name)
54│ return result
55│ return check_zero
56│
57│
The following error occurred when trying to handle this error:
error
(1312, 'CredRead', 'A specified logon session does not exist. It may already have been terminated.')
at ~\AppData\Roaming\pypoetry\venv\lib\site-packages\win32ctypes\pywin32\pywintypes.py:37 in pywin32error
33│ def pywin32error():
34│ try:
35│ yield
36│ except WindowsError as exception:
→ 37│ raise error(exception.winerror, exception.function, exception.strerror)
38│