0

I'm trying to push a container to GHCR that I've built with Docker locally. GitHub's documentation suggests that I put a Personal Access Token (PAT) with appropriate permissions in an environment variable and then have Docker log into GHCR like this:

$ echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin

My username is correct, $CR_PAT is definitely in the environment and being returned from the echo request. My token has the write:packages and read:packages permissions GitHub recommends. And yet when I run the above, it fails with:

Error response from daemon: Get https://gchr.io/v2/: http: server gave HTTP response to HTTPS client

Putting this string into Google finds no exact matches, and the only hits are talking about private registries. Which isn't relevant, I don't think, since I'm trying to use GCHR.

I'm on macOS 10.15. I'm running Docker 20.10.5, installed using Docker Desktop.

What am I missing?

Nick K9
  • 3,885
  • 1
  • 29
  • 62
  • Your error message contains a typo. It should be `ghcr.io` (GitHub Container Registry) instead of `gchr.io`. – anemyte Jun 23 '21 at 21:56
  • That's solved it! If you add an answer to the question, I'll accept it. Many thanks. – Nick K9 Jun 24 '21 at 18:00

1 Answers1

1

I wouldn't post this as an answer if I hadn't fallen (several times, actually) into the same pit myself. The error message contains a typo, it should be ghcr.io (GitHub Container Registry) instead of gchr.io.

Nick K9
  • 3,885
  • 1
  • 29
  • 62
anemyte
  • 17,618
  • 1
  • 24
  • 45