Docker Build Feature doesn't escape username in the Connection setting

Answered

TeamCity Server Version: 2019.1.2 (build 66342)

 

I have a Docker Registry Connection like:

- Registry name: MyRegistry
- Registry address: https://registry.mycorp.com
- Username: robot$account
- Password: *********

It passes the connection test of course.

But, when I set Docker Build Feature as MyRegistry, it fails to login to the registry.

[18:06:15] Cannot login to registry registry.mycorp.com
[18:06:11]
An error occurred while executing 'docker login -u "******" --password-stdin registry.mycorp.com': Error response from daemon: Get https://registry.mycorp.com/v2/: unauthorized: authentication required

It shows the username as *****, but I think probably it doesn't escape the special characters in the username properly.

I also found a workaround. If I escape the Username like 'robot\$account' in the Docker Registry Connection, it will fails to test connection, but it actually works fine in the build.

Can you guys confirm this please?

1
1 comment

Hi! 

Thank you for reporting it. I was able to reproduce the problem and created a bug in YouTrack. Please, watch\vote for it to get further updates. 

1

Please sign in to leave a comment.