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

Cross is unable to pull images #765

Closed
4 of 11 tasks
dave-tucker opened this issue Jun 7, 2022 · 6 comments
Closed
4 of 11 tasks

Cross is unable to pull images #765

dave-tucker opened this issue Jun 7, 2022 · 6 comments
Labels
bug needs-information needs more information to replicate

Comments

@dave-tucker
Copy link

Checklist

Describe your issue

I just installed via git, which is now the recommendation since #759 was merged

❯ cross build --target aarch64-unknown-linux-gnu
Unable to find image 'ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main' locally
docker: Error response from daemon: Head "https://ghcr.io/v2/cross-rs/aarch64-unknown-linux-gnu/manifests/main": denied: denied.
See 'docker run --help'.

And also:

❯ docker pull ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main
Error response from daemon: Head "https://ghcr.io/v2/cross-rs/aarch64-unknown-linux-gnu/manifests/main": denied: denied

I was under the impression that GHCR allowed unauthenticated access for public images... perhaps that has changed, or perhaps the README should document the steps required.

What target(s) are you cross-compiling for?

aarch64-unknown-linux-gnu

Which operating system is the host (e.g computer cross is on) running?

  • macOS
  • Windows
  • Linux / BSD
  • other OS (specify in description)

What architecture is the host?

  • x86_64 / AMD64
  • arm32
  • arm64 (including Mac M1)

What container engine is cross using?

  • docker
  • podman
  • other container engine (specify in description)

cross version

cross 0.2.1 (42cea7d 2022-06-07)

Example

Attempt to build any project, where Docker is installed AND you are not authenticated with GHCR

 cross build --target aarch64-unknown-linux-gnu

Additional information / notes

No response

@Alexhuszagh Alexhuszagh added the bug label Jun 7, 2022
@Alexhuszagh
Copy link
Contributor

Alexhuszagh commented Jun 7, 2022

I was under the impression that GHCR allowed unauthenticated access for public images... perhaps that has changed, or perhaps the README should document the steps required.

I believe that's true, I'll add some debugging info but I hope this just a temporary network bug.

@Alexhuszagh
Copy link
Contributor

Alexhuszagh commented Jun 7, 2022

For systems where unauthenticated access works for me, I've added the following. For example, on Windows I get:

$ docker login ghcr.io
Username:

So I'm not logged into any registry. Just for good measure, I haven't even started my SSH agent.

$ ssh-add -l
Could not open a connection to your authentication agent.

I'll get a list of images, and then fetch one that's unrelated:

$ docker images
REPOSITORY                                   TAG       IMAGE ID       CREATED      SIZE
ghcr.io/cross-rs/aarch64-linux-android       main      7ec45f56928b   4 days ago   3.99GB
ghcr.io/cross-rs/armv7-linux-androideabi     main      1d54871b6522   4 days ago   3.98GB
ghcr.io/cross-rs/aarch64-unknown-linux-gnu   main      8602d2945566   4 days ago   1.28GB
$ docker pull ghcr.io/cross-rs/armv7-unknown-linux-gnueabihf:main
main: Pulling from cross-rs/armv7-unknown-linux-gnueabihf
58690f9b18fc: Already exists
b51569e7c507: Already exists
da8ef40b9eca: Already exists
fb15d46c38dc: Already exists
c4bb01d5bb74: Pull complete
ca5dd73b2a10: Extracting [==========================================>        ]  154.9MB/180.4MB
924ddcdc32dc: Download complete
1d41e58f9108: Download complete
c2be8d2d6b2d: Download complete
ae09f147eae0: Download complete
e970f4bd429e: Download complete
e6b3d772b63a: Download complete
9afb644bef2b: Download complete
681a2c8230c9: Download complete
fa5d991fb606: Download complete
982b8e466b81: Download complete
f342bbfeaad7: Download complete
970d552e4c73: Download complete

I get the same for WSL2, Linux native (Fedora 36), and macOS Catalina. So Github registries should not require authenticated access. I've also tried this on Podman for a few platforms just for good measure.

@Alexhuszagh Alexhuszagh added the needs-information needs more information to replicate label Jun 7, 2022
@Emilgardis
Copy link
Member

Are you behind somekind of company proxy maybe?

@Emilgardis
Copy link
Member

Emilgardis commented Jun 7, 2022

I don't think issue belongs in this repository, it does not seem like a cross issue. (saying this to try to point you in the right way, we can try to help anyway <3)

@dave-tucker
Copy link
Author

Are you behind somekind of company proxy maybe?

I am not.

@Alexhuszagh aha! so I did a quick cat ~/.docker/config.json and it turns out I was authenticated - must have been when playing with GHCR a while back. Removing the auth for ghcr did the trick... I don't recall which token I used, but it would be nice to be allowed access to other public repos while authenticated to access private ones... but that's not a cross issue.

Thanks for the help!

@Emilgardis
Copy link
Member

I don't recall which token I used, but it would be nice to be allowed access to other public repos while authenticated to access private ones

This should work with a correct access token. Maybe the token was expired?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs-information needs more information to replicate
Projects
None yet
Development

No branches or pull requests

3 participants