-
Notifications
You must be signed in to change notification settings - Fork 59
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
control-service: add git ssl enabled flag #182
control-service: add git ssl enabled flag #182
Conversation
In order to enable Git urls over http we need to be able to pass extra argument. For example we will use it in implementation of local (single command) installation of our helm chart with local git server. From helm install they can be passed using helm install ... --set deploymentGitUrl=false Testing Done: unit and itegration tests Signed-off-by: Miroslav Ivanov [email protected]
URI u = URI.create(gitDataJobsUrl); | ||
if (StringUtils.isBlank(u.getScheme())) { | ||
return "https://" + u.toString(); | ||
String scheme = gitDataJobsSslEnabled ? "https" : "http"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to initialise, could return directly
git_url_scheme="https" | ||
[ "$GIT_SSL_ENABLED" = false ] && git_url_scheme="http" | ||
|
||
git clone $git_url_scheme://$git_username:$git_password@$git_repository ./data-jobs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jGit lib we use supports a variety of URL schemes, e.g. "git"
do we have tests to cover all the variations ?
The recent announcement https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ made me think about this
In order to enable Git urls over HTTP we need to be able to pass extra
argument. For example we will use it in implementation of local (single
command) installation of our helm chart with local git server.
From helm install they can be passed using
helm install ... --set deploymentGitUrl=false
Testing Done: unit and itegration tests
Signed-off-by: Miroslav Ivanov [email protected]