OS: Ubuntu 18.04 Server
Docker 18.3 CE
I am logged onto the server, from my Windows 10 laptop, using a PuTTY SSH session.
I don't have Docker on my local Windows laptop, so all the work is done on the remote server.
I can execute all Docker commands, on the remote server, using the terminal session.
However, when I try to save my image to the Docker hub, when I try to login, using:
docker login
I get the following error message:
error getting credentials - err: exit status 1, out: `GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.secrets was not provided by any .service files`
I did not get any error messages, when I created my image on the remote server.
I also do not see a .docker folder in the related home directory on the remote server. Any ideas?
I had the same issue. Current answer worked, but it saved credentials in clear text. Here's the solution if you want to keep them in a password store.
1) Download docker-credential-pass from https://github.com/docker/docker-credential-helpers/releases
2)
tar -xvf docker-credential-pass.tar.gz
3)
mv docker-credential-pass /usr/bin
4) You will need to setup docker-credential-pass (following steps are based of https://github.com/docker/docker-credential-helpers/issues/102#issuecomment-388634452)
4.1) install gpg and pass (
apt-get install gpg pass
)4.2)
gpg --generate-key
, enter your information. You should see something like this:Copy the 123... line
4.3)
pass init 1234567890ABCDEF1234567890ABCDEF12345678
(paste)4.4)
pass insert docker-credential-helpers/docker-pass-initialized-check
and set the next password "pass is initialized" (without quotes).4.5)
pass show docker-credential-helpers/docker-pass-initialized-check
. You should see pass is initialized.4.6)
docker-credential-pass list
5) create a ~/.docker/config.json with:
6) docker login should now work
Note: If you get the error "pass store is uninitialized" in future run, run the below command (it will reload the pass store in memory):
It will ask your password and it will initialize the pass store.
This is based off this discussion: https://github.com/moby/moby/issues/25169#issuecomment-431129898
I faced the same issue in ubuntu 18.08 and this finally worked for me.. as a temporary solution.
I had created this folder
home/.docker/
as some solutions suggested me to create a fileconfig.json
and write default credentials in it i.e.config.json
.Then renamed docker-credential-secretservice to something else so that it doesn't picks up this file.
sudo mv /usr/bin/docker-credential-secretservice /usr/bin/docker-credential-secretservice_x
and it worked!
Install the following Packages in ubuntu fixed my issue
sudo apt install gnupg2 pass