Skip to content

Git URL Validation Fails in Rancher UI Fleet GitRepo After Upgrade

Article Number: 000022148

Environment

Rancher 2.12.1

Situation

After upgrading Rancher to 2.12.x, validation of Git Repository URLs fails in the Rancher UI when editing the configuration under Continous Delivery > Resources > Git Repos > Edit Config. The UI displays the following error message 

It must be a valid HTTP(s) or SSH URL with no trailing spaces. 

The Git URLs use the ssh style format. This issue prevents editing of existing GitRepo configurations through Rancher UI, although the URLs themselves are functional

For example, for a GitHub repository, the following SSH style URL doesn't pass the validation in the Rancher UI.

ssh://git@github.com/username/repo.git

Cause

The UI validation for Git Repository URLs in Rancher version 2.12.1 incorrectly validates SSH URLs. This validation issue is a bug in the Rancher UI code.

Resolution

To address the Git-URL validation failure in the Rancher UI, use either of the following workarounds

Workarounds:

  • Use SCP-style format as below. It will allow you to edit the gitrepo through the Rancher UI
git@github.com:username/repo.git
  • If you want to continue using SSH-style URL, you may edit the GitRepo configuration directly via YAML, which will allow you to bypass the UI validation.

Fix:

  • UI validation issue fix is scheduled to be released with Rancher v2.13.0