LoginSignup
3
0

More than 3 years have passed since last update.

GitHub Packagesに公開したDockerイメージをpullする

Posted at

GitHub ActionsとGitHub PackagesでDockerのイメージを作ってpushしたので、いざpullして使おうとしたら以下のようなエラーが…

Error response from daemon: Get https://docker.pkg.github.com/v2/freeesia/vivideo/server/manifests/latest: no basic auth credentials

publicリポジトリなのに認証が必要…?と思って調べたら、どうも今はpublicリポジトリのイメージであれ認証が必要なようです。
https://github.community/t5/GitHub-Actions/docker-pull-from-public-GitHub-Package-Registry-fail-with-quot/td-p/32782

認証のためにはまずPersonal access tokensからトークンを生成します。

image.png
必要な権限はパッケージを取得するだけなので、read:packagesにチェックを入れて生成します。

あとはイメージを起動するマシンでdocker loginします

docker login -u <GitHubのユーザー名> -p <上記で生成したトークン> docker.pkg.github.com

以上で無事pullできるようになりました。

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0