GoogleCloudPlatform / docker-credential-gcr

A Docker credential helper for GCR users
https://gcr.io
Apache License 2.0
292 stars 92 forks source link

Output contains invalid Username for AR when installed using normal `go install` #135

Closed eriksw closed 1 year ago

eriksw commented 1 year ago

When docker-credential-gcr is installed via e.g. go install github.com/GoogleCloudPlatform/docker-credential-gcr@62afb2723512fd6572c6300024e0c94f734b0ae3 it produces invalid output with a Username of _dcgcr__token which Artifact Registry doesn't accept.

This was discussed at https://github.com/GoogleCloudPlatform/docker-credential-gcr/issues/129 but this should remain an open issue until it is fixed: Specifically, building docker-credential-gcr using normal go install without setting any special flags should either fail to compile or it should produce a tool that actually works with Artifact Registry.

(I have never before seen a go tool that has a functional misbehavior like this when built using normal go install. 🤯😤 This caused https://github.com/regclient/regclient/issues/453 which was excruciatingly frustrating to diagnose.)

sudo-bmitch commented 1 year ago

Note that the readme doesn't indicate that a version number is required: https://github.com/GoogleCloudPlatform/docker-credential-gcr#building-from-source

So if a version is required to make this work, the readme needs to be updated.