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

Fix checking push permission without skipping tls on configured (#628) #629

Closed
wants to merge 1 commit into from

Conversation

zhleonix
Copy link

When checking push permission, the skip-tls-verify options are not used, which causes failed operation on our private registry without importing root cert into the kaniko image.:
error checking push permissions -- make sure you entered the correct tag name, and that you are authenticated correctly, and try again: checking push permission for "private.repo/test/kaniko_demo:latest": Get https://private.repo/v2/: x509: certificate signed by unknown authority

A fix is required to add skipTlsVerify into httpTransport used in CheckPushPermissions.

@dbolshak
Copy link

dbolshak commented Apr 3, 2019

@imjasonh Could you please review this #629 ?

Also looks like there are too many options to manage TLS issues, is there any guide about how to do this properly?

if err := remote.CheckPushPermission(destRef, creds.GetKeychain(), http.DefaultTransport); err != nil {

// Create a transport to set our user-agent.
tr := http.DefaultTransport
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be (is there already?) some kind of GetTransport() method that does this in a shared location, sort of like how creds.GetKeychain() does? I'm not familiar with all of the available opts, and even if I were, if a new opt was added that configured HTTP requests like this, it'd be nice to have that applied in one common location.

I don't think it should necessarily block this PR, but it'd be nice to get feedback from someone more familiar with kaniko.

dbolshak referenced this pull request Apr 3, 2019
* Check push permissions before building images

* Fix doc comment

* improve error messages
@abergmeier
Copy link
Contributor

IMO it would be better to extract this into a function. Did that in #663.

@tejal29
Copy link
Contributor

tejal29 commented Sep 27, 2019

@zhleonix would like to rebase this ?

Copy link
Contributor

@tejal29 tejal29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already merged as part of 7cc899b

@tejal29 tejal29 closed this Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants