ipfs / ipfs/kubo

"ipfs add -n FILE" should not require "ipfs init"

Open
#7,990 2 comments 1 reaction 0 assignees View on GitHub
effort/days exp/expert kind/bug P3
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

#### Version information:

```
go-ipfs version: 0.8.0
Repo version: 11
System version: amd64/linux
Golang version: go1.15.8
```

#### Description:

When adding a file using `-n` (`--only-hash`), there should not be the need to initialize the IPFS repo.
Currently, if you install ipfs but don't run `ipfs init`(or cleanup using `rm -rf ~/.ipfs`), `ipfs add -n FILE` will fail with:
```
Error: no IPFS repo found in /root/.ipfs.
please run: 'ipfs init'
```

So it is correct that no IPFS repo can be found but that should not be required to only hash.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.