WIP: gh auth configure-docker#7828
Conversation
Signed-off-by: Jason Hall <jason@chainguard.dev>
Signed-off-by: Jason Hall <jason@chainguard.dev>
|
Friendly ping. I think it would be great to be able to use this myself when pushing to GHCR, and I'd at least love to get some feedback on the approach. |
|
@imjasonh Sorry for the delay in taking a look at this. Mislav is no longer working at GitHub hence why this fell through the cracks a bit. After looking through the issue and at comments #5150 (comment) and #5150 (comment) I am not sure this is the right direction. I am aligned with what Mislav previously said. I think trying to set up symlinks for our users is not the right approach and that having a separate Having said that, I think we should introduce a #!/bin/bash
# This "docker-credential-gh" utility should exist an as executable somewhere in PATH.
#
# Dependencies: gh
#
set -e
gh auth docker-credential $1I can understand this is not an ideal solution as it does not do all the set up work for the user, but I do think it moves us in the right direction and makes it easier than it is now to use |
|
Going to close this due to lack of movement from the author. |
Opening this as a proof of concept, to keep the discussion going.
Fixes #5150
This assumes
ghis onPATH, to be able to create a sibling symlink also onPATH. To test this, you need to:If the user doesn't have permission to write the symlink to
PATH,configure-dockerfails.When installed in the normal way (e.g.,
brew), the flow is:Open questions / issues:
gh's CLI scaffolding here instead?~/.docker/config.json, you can do it manually for now.Let me know if this is on the right track, and I can put some more work into it.
cc @mislav