Commit Graph

2046 Commits

Author SHA1 Message Date
Petar Maymounkov
8794928c31
add remote pinning policy for mfs (#7798)
* remote pinning service MFS policy
* update go-ipfs-config
* hardening secret sanitization in `ipfs config` commands

Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2021-01-28 18:58:44 -05:00
Andrew Gillis
6f6f04543b
Improve error message when running key command that locks repo (#7821)
* Improve error message when running key commands that must be run when the daemon is not already running

Fixes Issue #7814

`ipfs key export` now does a PreRun check like `ipfs key rotate` was to give a better error to the user then "someone else has the lock" in the event that the daemon is running while trying to execute these offline-only commands.

While unlikely the "someone else has the lock" error can still be shown if two processes try and grab the repo lock at the same time.

This PreRun function is also exported so it can be used by `ipfs init` where it was originally copied from.

* Added more `ipfs key` command tests

When daemon is running:
- Test that import works
- Test that export fails
- Test that rotate fails
2021-01-28 15:15:49 -05:00
Adin Schmahmann
3e7a105676
Merge pull request #7887 from ipfs/docs/clarify-repeated-options
docs: comma delimited options in pin remote --help
2021-01-28 13:31:24 -05:00
Marcin Rataj
3bca93787a
docs: comma delimited options in pin remote --help
This adds clarification suggested in
https://github.com/ipfs/go-ipfs/pull/7823#pullrequestreview-577889138
2021-01-28 17:23:46 +01:00
Adin Schmahmann
61f3a2f3a2 fix: restrict remote pinning service endpoint URIs to HTTP/HTTPS 2021-01-27 19:28:58 -05:00
Marcin Rataj
fc4095cfb3 refactor: url → endpoint
https://github.com/ipfs/go-ipfs/pull/7828#discussion_r543520089
2021-01-27 19:28:58 -05:00
Marcin Rataj
7313a45bc7 fix: url.RawFragment does not work in go1.14
I don't think we need to worry about #hash, so just removed it
2021-01-27 19:28:58 -05:00
Marcin Rataj
6851ede8eb refactor: normalization with path.Clean 2021-01-27 19:28:58 -05:00
Marcin Rataj
5f692a76de fix: normalize remote service endpoint
Closes #7826
2021-01-27 19:28:54 -05:00
Marcin Rataj
0b6912e3b3 refactor: cleanup arg params 2021-01-27 23:55:09 +01:00
Marcin Rataj
1cb90d7109 docs: pin remote readability
Co-authored-by: Jessica Schilling <jessica@protocol.ai>
2021-01-27 23:55:07 +01:00
Marcin Rataj
3b82dd8e55 docs: CLI docs for pin remote commands
This adds docs in form of longer description that is displayed
when --help is passes on the CLI.

While at it, unified some language to match fields in the config file
and other places + included some tips and best practices which should
improve onboarding experience.
2021-01-27 23:53:41 +01:00
Adin Schmahmann
a95a86ed54 feat: ipfs pin remote ls commands are comma delimited on the CLI only 2021-01-27 12:07:44 -05:00
Adin Schmahmann
7588a6a52a
Merge pull request #7829 from ipfs/fix/pin-remote-service-ls-json
fix: remote services ls always return a list
2021-01-14 17:37:40 -05:00
gammazero
20132a83ef code review changes 2021-01-14 02:29:11 -08:00
gammazero
267d6fc4fe Modify escaping 2021-01-12 14:54:21 -08:00
gammazero
306dfb34a1 additional escape 2020-12-18 17:23:30 -08:00
gammazero
7193f950d7 Escape non-printable characters in user output
Replaces control characters and non-printable characters with escape sequences, in any fields that are printed by the CLI, which could have been user input.

Output from `ipfs cat` is unchanged.
2020-12-17 18:16:34 -08:00
Marcin Rataj
4d52bbdde8
fix: remote services ls always return a list
Closes #7824
2020-12-15 00:42:18 +01:00
Petar Maymounkov
a8c7980721
add remote pinning to ipfs command (#7661)
Added support for remote pinning services

A pinning service is a service that accepts CIDs from a user in order to host the data associated with them.
The spec for these services is defined at https://github.com/ipfs/pinning-services-api-spec

Support is available via the `ipfs pin remote` CLI and the corresponding HTTP API

Co-authored-by: Petar Maymounkov <petarm@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2020-12-08 20:32:33 -05:00
Adin Schmahmann
373f5f9f0d
Merge pull request #7755 from ChaituVR/patch-1
* Clarify why ipfs file ls is being deprecated.
* Explain that ipfs files ls works on both IPFS paths and MFS paths.
2020-11-24 13:40:49 -05:00
Adin Schmahmann
6e82b53f03
Merge pull request #7753 from ipfs/fix/dag-import-export-coreapi
fix: ipfs dag export uses the CoreAPI and respects the offline flag
2020-11-24 13:14:53 -05:00
Chaitanya
f46891e0b5
Update ls.go 2020-11-24 14:02:10 +05:30
Chaitanya
8487fad43c
Update ls.go 2020-11-24 14:00:42 +05:30
Chaitanya
ec64dc5c39
Update ls.go 2020-11-24 13:51:29 +05:30
Chaitanya
1cfd8c7568
Update core/commands/unixfs/ls.go
Co-authored-by: Steven Allen <steven@stebalien.com>
2020-11-24 13:42:48 +05:30
Chaitanya
fa81f2a7b3
Update core/commands/files.go
Co-authored-by: Steven Allen <steven@stebalien.com>
2020-11-24 13:42:36 +05:30
Chaitanya
475e0ea399
Update ls.go 2020-11-16 18:01:22 +05:30
Chaitanya
0c4ad11cfb
Update files.go 2020-11-16 17:52:30 +05:30
Andrew Nesbitt
37a637e8c1
Fix typo in ipfs dag stat command 2020-11-11 13:04:52 +00:00
Chaitanya Raju
c6fe39a4a5 Explain that ipfs ls works on IPFS paths, and ipfs files ls works on both IPFS paths and MFS paths. 2020-11-07 12:51:01 +05:30
Chaitanya
d4cd378092
Clarify why ipfs file ls is being deprecated. 2020-11-07 12:24:18 +05:30
Adin Schmahmann
9c5304a21d fix: ipfs dag export uses the CoreAPI and respects the offline flag 2020-11-04 21:14:00 -05:00
Fazlul Shahriar
cac753bb18
fix build on Plan 9
Fixes #7575
Fixes #7671
2020-09-23 22:27:01 -04:00
Adin Schmahmann
16b3fd4d87 fix: remove the (empty) alias for --peerid-base 2020-09-17 13:52:18 -04:00
Adin Schmahmann
904ad1626a fix: remove the (empty) alias for --ipns-base 2020-09-09 11:30:45 -04:00
Adin Schmahmann
6cbda0f62f refactor: put all --ipns-base options in one place 2020-09-09 11:30:45 -04:00
Adin Schmahmann
ba1d225212 fix: ipfs dht put/get commands now work on keys encoded as peerIDs and fail early for namespaces other than /pk or /ipns 2020-08-30 02:16:15 -04:00
Adin Schmahmann
b88bdfeb9d chore: update go-multiaddr and go-multiaddr-net 2020-08-25 15:24:48 -04:00
Adin Schmahmann
6871e6d056 fix: ipfs pin ls - return an error when encountering a pin retrieval error 2020-08-25 10:54:56 -04:00
Jacob Heun
0ed43e903e
fix(key): dont allow backup key to be named 'self'
docs: update the key rotate help docs to be clearer about the backup
2020-08-21 19:42:42 +02:00
Petar Maymounkov
56f5a123d9 update ipfs key default type 2020-08-19 15:22:59 -07:00
Petar Maymounkov
a68e1469ba add --peerid-base to ipfs id 2020-08-18 16:39:23 -07:00
Petar Maymounkov
4975d9b179 renames 2020-08-18 08:39:47 -07:00
Petar Maymounkov
b4ad66eda4 add --ipns-base to publish and subs commands
add sharness tests for --ipns-base in name publish and subs commands
2020-08-17 21:43:02 -07:00
Petar Maymounkov
2b013a1ac5 use standard multibase format labels 2020-08-17 21:43:01 -07:00
Petar Maymounkov
23a26c05d3 rename -f to --ipns-base 2020-08-17 21:43:01 -07:00
Petar Maymounkov
80e859ef6f add format flag to key rename and remove, defaulting to b36cid; update sharness 2020-08-17 21:43:01 -07:00
Petar Maymounkov
3cbe111b2d use b36 keys by default for keys and IPNS 2020-08-17 21:43:01 -07:00
Adin Schmahmann
8ae5aa56d1
add ipfs dag stat command (#7553)
* commands: add ipfs dag stat command
* sharness: add ipfs dag stat tests
2020-08-17 14:29:36 -04:00