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

Properly support git uris of the form user@host:path/to/file.git in build secret injector #13223

Closed
jim-minter opened this issue Mar 3, 2017 · 4 comments

Comments

@jim-minter
Copy link
Contributor

jim-minter commented Mar 3, 2017

It's confusing that you currently /must/ run oc annotate secrets/foo 'build.openshift.io/source-secret-match-uri-1=ssh://host/path/to/file.git' (with ssh://, without user@) but then may run oc new-app user@host:path/to/file.git (without ssh://, with user@) or oc new-app ssh://user@host/path/to/file.git (with ssh://, with user@).

@mvlach

@jim-minter jim-minter self-assigned this Mar 3, 2017
@jim-minter
Copy link
Contributor Author

(note to self: saw 'Host key verification failed' error at build time after successful secret injection - may or may not have been down to host infrastructure).

@mvlach
Copy link

mvlach commented Mar 3, 2017

I think there is problem with the ssh:// pattern. I created new secret with my private credentials (ssh) and created the new-app. Then manually add secret and everythink build correctly.

Let's assume that I have correct secret annotated

build.openshift.io/source-secret-match-uri-1=ssh://host:path/to.git

and when I create a new application like this

oc new-app wildfly~git@host:path/to.git

then the build doesn't work. The spec.source.sourceSecret.name is not correclty enabled.
It is very confusing.


The correct form is:

oc annotate secrets/sshsecret 'build.openshift.io/source-secret-match-uri-1=ssh://host/path/to.git'

and

oc new-app wildfly~ssh://git@host/path/to.git

when you use new-app without ssh:// then the sourceName is not set and if you use : instead of / then the git source cannot be pulled.

@jim-minter

@jim-minter
Copy link
Contributor Author

Some improvements in #13282

@jim-minter
Copy link
Contributor Author

Documentation improvements in openshift/openshift-docs#5232

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

No branches or pull requests

3 participants