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

If a git secret has ssh-auth type, warn about urls starting with https: and vice versa #3094

Closed
ghost opened this issue Aug 12, 2020 · 1 comment · Fixed by #3136
Closed
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@ghost
Copy link

ghost commented Aug 12, 2020

Feature request

Validate the creds-init Secrets that will be injected into a Step container. If a Git secret has a type of ssh-auth but is going to be used against a repo URL starting with https:// then git won't even try to use the SSH keys. We should warn about this via an Event on the TaskRun or similar.

Similarly, if a creds-init Secret has a type of basic-auth but the URL being used to initialize that credential is of the form user@domain.com then git will ignore the basic auth credential, which can also be confusing. Again we should try and validate that the URL and credential line up and warn the user if they don't.

This is another fiddly edge case in our creds-init dance. See #1983 (comment) for an example where a user hit a bump related to this.

Use case

User supplies SSH credential for their github repo in a k8s Secret. User accidentally puts the https:// URL in their Git PipelineResource. The git clone step fails because the URL is not an ssh URL and so git ignores the SSH creds. The user should be warned about this mismatch more explicitly.

@ghost ghost added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 12, 2020
@FogDong
Copy link
Member

FogDong commented Aug 25, 2020

/assign @FogDong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant