Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DockerLogin with EnablePasswordStdin produce invalid command line #5

Open
jrouaix opened this issue Nov 7, 2018 · 3 comments
Open

Comments

@jrouaix
Copy link

jrouaix commented Nov 7, 2018

When using this command configuration :

 DockerLogin(s => s
                .SetServer(DockerRegistryServer)
                .SetUsername(DockerRegistryUserName)
                .SetPassword(DockerRegistryPassword)
                .EnablePasswordStdin()
            );

the command generated is :

docker login --password <MYPASS> --password-stdin --username <MYUSER> <MYREGISTRY>.azurecr.io

and the error messages are :

2018-11-07T10:19:51.2642236Z ##[error]WARNING! Using --password via the CLI is insecure. Use --password-stdin.
2018-11-07T10:19:51.2643599Z ##[error]--password and --password-stdin are mutually exclusive
2018-11-07T10:19:51.3433335Z ##[error]Process 'docker' exited with code 1. Verify the invocation.

the second one is the important here

A workaround will be not to use password stdin for now but i produce the password in our CI logs ... not so safe.

@arodus
Copy link
Owner

arodus commented Nov 7, 2018

You are right, the password parameter should be obscured, will update the addon so the password shouldn't get printed to the log anymore.

The addon is just an auto generetad wrapper that's why the .EnablePasswordStdin() parameter exists, but it's currently without any function since Nuke doesn't support passing parameters through stdin yet. I'm also not sure if this is required at all or obscuring the password is enough.

arodus added a commit that referenced this issue Nov 7, 2018
- removed `PasswordStdin`
- changed that `Password` is now obscured when printed to Output
@matkoch
Copy link
Collaborator

matkoch commented Nov 7, 2018

There is nuke-build/nuke#76 planned, which would solve this. If you like, you could take it.

@mbenedykconfigit
Copy link

Is there any progress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants