cli: Docker login to registry in windows server 2016 - Error saving credentials
Hi ,
I am using windows server 2016 with docker for windows .
docker info Containers: 2 Running: 0 Paused: 0 Stopped: 2 Images: 105 Server Version: 18.06.0-ce Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: d64c661f1d51c48782c9cec8fda7604785f93587 runc version: 69663f0bd4b60df09991c08812a60108003fa340 init version: fec3683 Security Options: seccomp Profile: default Kernel Version: 4.9.93-linuxkit-aufs Operating System: Docker for Windows OSType: linux Architecture: x86_64 CPUs: 2 Total Memory: 1.934GiB Name: linuxkit-00155d000400 ID: LDIE:JDCD:KNOR:RNPH:7MWV:MNKE:I2LH:3NMM:ZERH:M7HE:MWAI:Q4RW Docker Root Dir: /var/lib/docker Debug Mode (client): false Debug Mode (server): true File Descriptors: 23 Goroutines: 48 System Time: 2018-08-02T14:33:25.5407319Z EventsListeners: 1 Registry: https://index.docker.io/v1/ Labels: Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false
I am using jenkins pipeline for build docker images and it’s build and tag the images but when i am trying to do docker login before push, i am getting this error :
“WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error saving credentials: error storing credentials - err: exit status 1, out: A specified logon session does not exist. It may already have been terminated.”
This is not happen to me when i am with logon active user .
Thanks ,
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 5
- Comments: 19
Hey Guys,
I have had the same issue, when trying to authenticate from a PowerShell session, while it was working fine when the same command was executed locally.
The way I have fixed it, is by looking at the C:\Users_youruser_.docker\config.json If there is a line like: “credsStore”: “wincred” , make sure that you change it to the following: “credsStore”: “”, save the config, and re-execute the same command locally: $ docker login -u ******** -p ******** url
Afterwards take a look at the config again, and now you should have the following line instead, under the repository: “auth”: “…”
Having the config that way, allowed me to execute successfully the commands from another session as well.
Followup: This only happens through an ssh session to the Windows server. When the same command is run locally, the login succeeds. When an ssh session is established directly to the server (NOT using Jenkins) the same error is observed.