ccontavalli / ssh-ident

Different agents and different keys for different projects, with ssh.
Other
963 stars 71 forks source link

Cannot use ssh-ident with Python 2.7 #68

Open golf1052 opened 2 years ago

golf1052 commented 2 years ago

Related to #65

Python 2.7 does not support shutil.which. This was only introduced in Python 3.3

maddes-b commented 2 years ago

Please have a look at the fork at https://github.com/ssh-ident/ssh-ident1, just added a workaround that should fit Python 2.x, 3.x and also 3.10+ with deprecation warnings and even Python 3.12+ without distutils library. Would be nice if you could test it in your environment.

jmauro commented 2 years ago

Hello,

I tried this version, here is the output on Debian:

root@hyoga:/data/repository/ssh-ident# git pull -r
[ERROR] ssh-ident found 'ssh-ident' as the next command to run.
Based on argv[0] (/data/repository/ssh-ident/ssh-ident), it seems like this will create a loop.

Please use BINARY_DIR, or BINARY_SSH plus BINARY_SSH_AGENT plus
BINARY_SSH_ADD, or change the way ssh-ident is invoked
(eg, a different argv[0]) to makeit work correctly.
[ERROR] ssh-ident found 'ssh-ident' as the next command to run.
Based on argv[0] (/data/repository/ssh-ident/ssh-ident), it seems like this will create a loop.

Please use BINARY_DIR, or BINARY_SSH plus BINARY_SSH_AGENT plus
BINARY_SSH_ADD, or change the way ssh-ident is invoked
(eg, a different argv[0]) to makeit work correctly.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
root@hyoga:/data/repository/ssh-ident# python --version
Python 2.7.18
root@hyoga:/data/repository/ssh-ident# cat /etc/debian_version
bookworm/sid
root@hyoga:/data/repository/ssh-ident#

So I am not sure if you could say it worked 😉

Kind regards, JM