-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Commands hang when run as an SSH command #981
Comments
@dylanPowers agreed! this likley needs to be fixed in the cmds lib |
this is still an issue |
The fixes in #1263 are possibly related |
Would be nice to have a test case-- if we figure out what's hanging them we
|
This is fixed now |
I have a functional IPFS node. If I run:
I get:
If I SSH into the VM and run the command interactively, it works just fine. |
@hbarcelos your issue seems fairly different from this one. go-ipfs is not hanging but instead cannot find the repo. If the solution for you isn't apparent from my comments below could you open a new issue specifically for this that contains more info about your setup such as the output of go-ipfs uses the IPFS_PATH environment variable to locate where the repository is. My guess is that you installed go-ipfs using snap and the IPFS_PATH is set to be handled by snap https://github.com/ipfs/go-ipfs/blob/0d63fbb6059ac3a5fa9b658984cb1de12ec6c80f/snap/snapcraft.yaml#L24 Or alternatively you manually set IPFS_PATH to a different location. If the correct IPFS_PATH environment variables (whether yours or snap's) are not available to the non-interactive shell the you'll run into problems. For more info on how environment variables differ in interactive vs non-interactive shells see here. |
@aschmahmann thanks a lot for the pointers. In deed I had a custom I managed to workaround by setting it to the correct value on |
When running an IPFS command over SSH as a command parameter, the process will hang. Simplest test:
I figured this is possibly because a terminal isn't present, so I went digging around the ssh man pages and what do you know running
ssh <host> -t 'ipfs cat <some_hash>'
works because it adds in a "pseudo-tty". That's a suitable workaround for ssh, but I'm sure this could trip up other applications that like to run commands without a terminal present.The text was updated successfully, but these errors were encountered: