Description of problem:
Want that all standards url be posible when setting ssh git url.
OCP 4 doesn't allow to set 'ssh://[user@]server/project.git' as git repository
url, only '[user@]server:project.git' format is allowed
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Try to create a new build with the following ssh url:
2. You get 'Invalid Git URL.' error
3. Only the following format is allowed:
'Invalid Git URL.' error appears
That this url format is accepted
Referring to our docs, it isn't entirely clear which URI formats are supported for git source . `ssh://` support is implied by the automatic source secret linking feature .
As mentioned in the description, the `[user@]server:project.git` is a valid work-around.
For the record: I managed to run a build successfully with the following BuildConfig(using version 4.5):
I had to create a secret containing my ssh private keys(see below) but it worked as expected.
$ oc create secret generic git-secret \
Just checked on a cluster version 4.2 and it works using the same approach I have used on Comment 3. I have also tested directly from the command line and it works as well. Maria, add to this ticket the exact commands you are running so I can replicate.
[rmarasch@loaner ~]$ oc version
Client Version: openshift-clients-4.2.29-202004110432
Server Version: 4.2.29
Kubernetes Version: v1.14.6-152-g117ba1f
oc create secret generic hi \
oc new-app ssh://git/ricardomaraschini/hi --source-secret=hi
Sorry, I thought I put it in the description but I didn't...
This issue happens when creating new-app from console, not when creating it from the cli.
Sorry for the inconvenience.
Thanks Maria, I am migrating this to Management Console component as it seems more adequate.
Re-assigning to the DevConsole team since this belongs to their package.
This issue was addressed in 4.3 by improving the validation regex.