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

Can't publish; please run an ipfs node and try again #230

Open
anacrolix opened this issue Feb 28, 2019 · 7 comments
Open

Can't publish; please run an ipfs node and try again #230

anacrolix opened this issue Feb 28, 2019 · 7 comments

Comments

@anacrolix
Copy link
Contributor

$ gx publish
gx cannot publish using public gateways.
please run an ipfs node and try again.

I am running a node locally, I'm not sure why it's not finding it.

@Stebalien
Copy link
Collaborator

What do you get when you run:

> cat "${IPFS_PATH:-~/.ipfs}/api"

?

@anacrolix
Copy link
Contributor Author

Thanks. My IPFS_PATH was in a non-default location. Running IPFS_PATH=... gx publish worked. Also cat "${IPFS_PATH:-$HOME/.ipfs}/api".

I couldn't find anything about IPFS_PATH in the gx documentation, is this actionable?

@Stebalien
Copy link
Collaborator

$IPFS_PATH is how we tell IPFS (and related tools) where the IPFS repo is. It's documented in ipfs -h and ipfs init -h.

However, gx should probably print out something a bit more verbose (e.g., couldn't find some API file/repo).

anacrolix added a commit to anacrolix/gx that referenced this issue Mar 1, 2019
@anacrolix
Copy link
Contributor Author

Perhaps also a hint in the CLI UI?

@Stebalien
Copy link
Collaborator

I was thinking we should put something in the error message, where in the CLI did you want to put this?

@anacrolix
Copy link
Contributor Author

Maybe

$ gx publish
local ipfs node not found

gx publish mentions something in its description:

$ gx help publish
NAME:
   gx publish - publish a package

USAGE:
   gx publish [command options] [arguments...]

DESCRIPTION:
   publish a package into ipfs using a locally running daemon. <---

Something like that description belongs in the top level command, deferring all IPFS behaviours to the IPFS standalone command or whatever it uses:

$ gx help
NAME:
   gx - gx is a packaging tool that uses ipfs

USAGE:
   gx [global options] command [command options] [arguments...]

  <something here about delegation to ipfs?>

<snip>

@Stebalien
Copy link
Collaborator

The gx publish help text should definitely be more verbose. Most other commands work just fine without the daemon but it couldn't hurt to mention it.

Maybe:

  1. Add a note to see gx help to the gx help publish text.
  2. Add the daemon information to the gx help output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants