You are not logged in.

#1 2021-12-07 18:44:11

Keyboard_Crasher
Member
Registered: 2021-12-02
Posts: 23

Git insists on using repassh

If I do pretty much anything with git, I get this error:

$ git push --set-upstream origin feature/zonk
fatal: cannot run /usr/bin/repassh: No such file or directory
fatal: cannot run /usr/bin/repassh: No such file or directory
fatal: unable to fork

Obviously running this particular command in an already-existing repo. I have only got this error on Arch Linux so decided to post on this forum instead of Stack Overflow.

Offline

#2 2021-12-07 18:53:57

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,693

Re: Git insists on using repassh

Can you post the output of git config -l  ?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2021-12-07 19:00:41

Keyboard_Crasher
Member
Registered: 2021-12-02
Posts: 23

Re: Git insists on using repassh

ewaller wrote:

Can you post the output of git config -l  ?

Sure!

$ git config -l
user.email=keyboard@crasher
user.name=Keyboard_Crasher
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=ssh://gitlab.com/user/repo.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master

Last edited by Keyboard_Crasher (2021-12-07 19:01:26)

Offline

#4 2021-12-07 19:12:54

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,693

Re: Git insists on using repassh

Okay, looks reasonable.  Do you / have you ever / used pip to install things system wide?

Edit:  What is the output of alias

Last edited by ewaller (2021-12-07 19:14:19)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#5 2021-12-07 19:19:45

Keyboard_Crasher
Member
Registered: 2021-12-02
Posts: 23

Re: Git insists on using repassh

ewaller wrote:

Okay, looks reasonable.  Do you / have you ever / used pip to install things system wide?

I have. Namely, I have installed repassh at some stage. Back then I had the following results:

$ git push --set-upstream origin feature/zonk
Error loading configuration!
[Errno 2] No such file or directory: '/home/user/.config/repassh/config.json'
repassh found '/bin/repassh' as the next command to run.
Based on argv[0] (/usr/bin/repassh), it seems like this will create a
loop.

Please use BINARY_SSH, BINARY_DIR, or change the way
repassh is invoked (eg, a different argv[0]) to make
it work correctly.
Error loading configuration!
[Errno 2] No such file or directory: '/home/user/.config/repassh/config.json'
repassh found '/bin/repassh' as the next command to run.
Based on argv[0] (/usr/bin/repassh), it seems like this will create a
loop.

Please use BINARY_SSH, BINARY_DIR, or change the way
repassh is invoked (eg, a different argv[0]) to make
it work correctly.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I since then uninstalled the system-wide installation via

$ pip uninstall repassh

(outside virtual environment).

Last edited by Keyboard_Crasher (2021-12-07 19:24:38)

Offline

#6 2021-12-07 19:27:43

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,693

Re: Git insists on using repassh

Did you see may edit?  I think you may still have an alias set in your profile.  Check the output of alias


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#7 2021-12-07 19:35:06

Keyboard_Crasher
Member
Registered: 2021-12-02
Posts: 23

Re: Git insists on using repassh

ewaller wrote:

Did you see may edit?  I think you may still have an alias set in your profile.  Check the output of alias

I'm using the Xonsh shell. Here's the equivalent:

$ aliases['ssh']
<function xontrib.ssh_agent.sshc.<locals>.command>

On Bash I have:

$ alias
alias ls='ls --color=auto'

Running the Git command in Bash yields to the same error message.

Offline

#8 2021-12-07 19:39:36

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,693

Re: Git insists on using repassh

I know nothing of Xonsh, but it looks like there is a function defined for ssh.
edit:What happens if you try your git push from inside a Bash shell?

Does Xonsh have something like which  ?  what happens in Xonsh if you run ssh ?  or whatever is the equivalent of which ssh  ?

Edit: From Bash, what is the output of which ssh

Last edited by ewaller (2021-12-07 19:40:46)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#9 2021-12-07 19:45:51

Keyboard_Crasher
Member
Registered: 2021-12-02
Posts: 23

Re: Git insists on using repassh

ewaller wrote:

I know nothing of Xonsh, but it looks like there is a function defined for ssh.
edit:What happens if you try your git push from inside a Bash shell?

Does Xonsh have something like which  ?  what happens in Xonsh if you run ssh ?  or whatever is the equivalent of which ssh  ?

Edit: From Bash, what is the output of which ssh

On Bash:

$ which ssh
/usr/bin/ssh

Xonsh has which as well:

$ which ssh
<function sshc.<locals>.command at 0x7fdb47fb7310>

Offline

#10 2021-12-07 19:47:25

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,693

Re: Git insists on using repassh

And in bash, if you run just ssh does it throw the error you see with git?

Edit:  Wow a shell in Python (pronounced "Conch Shell")  Who knew?

Last edited by ewaller (2021-12-07 19:49:34)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#11 2021-12-07 19:53:56

Keyboard_Crasher
Member
Registered: 2021-12-02
Posts: 23

Re: Git insists on using repassh

ewaller wrote:

And in bash, if you run just ssh does it throw the error you see with git?

$ ssh
Error loading configuration!
[Errno 2] No such file or directory: '/home/user/.config/repassh/config.json'
Global agent is running
Loading keys:
...
ewaller wrote:

Edit:  Wow a shell in Python (pronounced "Conch Shell")  Who knew?

I highly recommend looking more into it. Has done wonders to my workflow and is great fun to use.

Offline

#12 2021-12-07 20:01:26

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,693

Re: Git insists on using repassh

I just installed it and have a shell open now.  Intriguing combination of Bash and ipython.

Back to your issue. repassh has it hooks in ssh somehow. it does not seem to be (in bash) an alias.  Your PATH leads you to the right place..  Mayhaps it is time to look at /etc/ssh/ssh_config.  Anything in there that is not a comment?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#13 2021-12-07 20:14:32

Keyboard_Crasher
Member
Registered: 2021-12-02
Posts: 23

Re: Git insists on using repassh

ewaller wrote:

I just installed it and have a shell open now.  Intriguing combination of Bash and ipython.

Isn't it? You can run the cofiguration wizard by:

$ xonfig wizard

It runs you through Bash migration and choosing, which 'xontrib' (Xonsh contribution) packages to load. I recommend at least coreutils, jedi for tab-completion and vox for environment management. Venv and the alike don't work well with Xonsh so it has it's own solution for that.

And what a coincidence! As I was looking at my installed xontribs for recommendations, I realized that I have a 'ssh-agent' xontrib installed and loaded. Removing that and opening a new shell fixed the issue!

So take this a warning, don't install just any xontrib, but only those you know what they are doing and you know you want to have.

Offline

Board footer

Powered by FluxBB