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

ipfs refs doesn't work with sharded directories #6596

Closed
lidel opened this issue Aug 21, 2019 · 4 comments · Fixed by #6601
Closed

ipfs refs doesn't work with sharded directories #6596

lidel opened this issue Aug 21, 2019 · 4 comments · Fixed by #6601
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@lidel
Copy link
Member

lidel commented Aug 21, 2019

Version information:

0.4.22

Description:

ipfs refs does not work with HAMT-sharded unixfs directories:

$ ipfs refs -r /ipfs/QmT5NvUtoM5nWFfrQdVrFtvGfKFmG7AHE8P34isapyhCxX/wiki/Mars.html
Error: no link named "wiki" under QmT5NvUtoM5nWFfrQdVrFtvGfKFmG7AHE8P34isapyhCxX

Note: the same path works fine with ipfs resolve:

$ ipfs resolve -r /ipfs/QmT5NvUtoM5nWFfrQdVrFtvGfKFmG7AHE8P34isapyhCxX/wiki/
/ipfs/QmRNXpMRzsTHdRrKvwmWisgaojGKLPqHxzQfrXdfNkettC

$ ipfs resolve -r /ipfs/QmT5NvUtoM5nWFfrQdVrFtvGfKFmG7AHE8P34isapyhCxX/wiki/Mars.html
/ipfs/bafkreig6ltd5dojmrhlsweuiaxt3ag2p5644wwcyjmqt6gajmbrbylke4m
@lidel lidel added the kind/bug A bug in existing code (including security flaws) label Aug 21, 2019
ralendor pushed a commit to ralendor/go-ipfs that referenced this issue Jun 6, 2020
ralendor pushed a commit to ralendor/go-ipfs that referenced this issue Jun 8, 2020
ralendor pushed a commit to ralendor/go-ipfs that referenced this issue Jun 8, 2020
@danimesq
Copy link

danimesq commented May 3, 2021

Hasn't been fixed, apparently (at least on ipfs.io gateway).

@Stebalien

Terminal log:

git clone https://ipfs.io/ipfs/QmYrS7cNYXGGh4n38w5vcgBrinF7X3Yii24PCa2FEWVXuZ/
Cloning into 'QmYrS7cNYXGGh4n38w5vcgBrinF7X3Yii24PCa2FEWVXuZ'...
remote: ipfs resolve -r /ipfs/QmYrS7cNYXGGh4n38w5vcgBrinF7X3Yii24PCa2FEWVXuZ/info/refs: no link named "refs" under QmbJsMQ5qNb4zwDEQUTFtCp7S1MyZFnrkMMmW6kyg8en62
fatal: repository 'https://ipfs.io/ipfs/QmYrS7cNYXGGh4n38w5vcgBrinF7X3Yii24PCa2FEWVXuZ/' not found

Screenshot from 2021-05-03 13-01-33
Screenshot from 2021-05-03 13-01-42

The same error don't occur when git cloning the same local folder.

@Stebalien
Copy link
Member

This issue is about the ipfs refs command. Your issue is due to the fact that there is no "refs" folder inside of the "info" folder. The "refs" folder you're seeing there is in the root directory, the "info" directory only contains an "exclude" file.

@danimesq
Copy link

danimesq commented May 3, 2021

@Stebalien

Your issue is due to the fact that there is no "refs" folder inside of the "info" folder.

Then, why it worked locally?

@woss
Copy link

woss commented Sep 27, 2021

@DaniellMesquita your issue is that you didn't run the git update-server-info inside the bare repo. Do that and then add the repo to the ipfs. you will be able to clone it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants