[user@host folder-docker]$ docker compose up
[+] Running 0/0
⠋ app Pulling 0.0s
error getting credentials - err: exit status 1, out: error getting credentials - err: exit status 1, out: no usernames for https://index.docker.io/v1/
I am currently logged into the application, set up pass with init as per dockers documentation.
I am on Fedora 36.
docker-compose.yml:
# ./docker-compose.yml
version: '3'
services:
app:
image: adhocore/lemp:8.1
# For different app you can use different names. (eg: )
container_name: some-app
volumes:
# app source code
- ./home/user/Documents/git/web-folder:/var/www/html
# db data persistence
- db_data:/var/lib/mysql
# Here you can also volume php ini settings
# - /path/to/zz-overrides:/usr/local/etc/php/conf.d/zz-overrides.ini
ports:
- 8080:80
environment:
MYSQL_ROOT_PASSWORD: supersecurepwd
MYSQL_DATABASE: appdb
MYSQL_USER: dbusr
MYSQL_PASSWORD: securepwd
# for postgres you can pass in similar env as for mysql but with PGSQL_ prefix
volumes:
db_data: {}
I am not sure what i’ve done wrong here. I followed the documentation from the docker website.
AMA.
Other
I followed the instructions from the official Docker documentation pages to perform this install.
Other Other:
I am using a hardware security key with PAM auth.
I have not tried docker with any other setup, this is my first fresh start.
I additionally receive these errors
after logging in: Error saving credentials: error storing credentials - err: exit status 1, out: error getting credentials - err: exit status 1, out: no usernames for https://index.docker.io/v1/
Can confirm this is only an issue after installing docker desktop rpm file.
Yesterday I installed Docker Desktop for Linux and got the same error message. This was the error message that I got when I first tried to install it. I didn’t want to solve it then so I just deleted the reference to the credStore from the docker client config file but yesterday I wanted to solve it. I also followed the official documentation, at least I thought so. I realized I had two mistakes. One is that you mentioned that you have run. I did not generate GPG key, but generating GPG key was not enough. I could log in using the graphical interface, but id didn’t work from the terminal. Then I ran pass without parameters and saw I had multiple records in the output. Then I removed the .password-store folder from my home. This is not mentioned in the documentation or if it is, I didn’t find it.
rm -rf "$HOME/.password-store"
Then I tried docker login again and it finally worked.
In my case I had Docker Desktop installed before so I had some files from the previous installation. The documentation starts with how you need to remove the previous installation, but since it did not mention this folder, it is possible that it happened to me because of that previous installation. If you didn’t have Docker Desktop before, I am not sure if this helps you.
One more thing that you can try. When the documentation instructs you to run pass init, make sure you don’t copy-paste the command from the documentation and use the ID that belongs to your generated GPG key. If you do this after trying to remove password-store, try to remove it again (I am not sure if it is necessary)