Closed nnsay closed 1 year ago
If you add a step right before login with:
- run: |
security -v unlock-keychain ~/Library/Keychains/login.keychain-db
Does it work?
Also be careful because when using a self-hosted runner there would be concurrent access to the Docker config. See https://github.com/docker/login-action/issues/173#issuecomment-1079688020 for more info.
I hit the same issue. I run the self-hosted runner as a custom user, and the first issue was that this used did not have a login keychain.
It is possible that macOS will create the keychain if you log in with the user on the GUI. I created it from R: keyring::keyring_create("login")
.
The second issue is that the keychain must be unlocked. I did this from a terminal:
sudo -s
su <customuser>
security -v unlock-keychain ~/Library/Keychains/login.keychain-db
After this docker/login-action@v2
works on the self-hosted runner. HTH.
Behaviour
Steps to reproduce this issue
docker/login-action@v2
Expected behaviour
the
docker login action
is ok and the image on runner can be push to ghcr.ioActual behaviour
docker does not login. But if change to self hosted runner to ubuntu-latest, the step is ok.
Configuration
Logs