diff --git a/app/assets/javascripts/directives/url_validation.js b/app/assets/javascripts/directives/url_validation.js index e44fa241cbf..7952c48992e 100644 --- a/app/assets/javascripts/directives/url_validation.js +++ b/app/assets/javascripts/directives/url_validation.js @@ -10,7 +10,7 @@ ManageIQ.angular.app.directive('urlValidation', function() { }; var validUrl = function(s) { - return s.substring(0, 8) === 'https://' || s.substring(0, 7) === 'http://'; + return s.substring(0, 8) === 'https://' || s.substring(0, 7) === 'http://' || s.match(/^[-\w:.]+@.*:/); }; } } diff --git a/app/views/ansible_repository/_repository_form.html.haml b/app/views/ansible_repository/_repository_form.html.haml index 4ed7b3a098f..a78ab9a3f18 100644 --- a/app/views/ansible_repository/_repository_form.html.haml +++ b/app/views/ansible_repository/_repository_form.html.haml @@ -53,7 +53,7 @@ %span.help-block{"ng-show" => "angularForm.scm_url.$error.required"} = _("Required") %span.help-block{"ng-show" => "angularForm.scm_url.$error.urlValidation"} - = _("URL must include a protocol (http:// or https://)") + = _("URL must include a protocol (http:// or https://) or be a valid SSH path (user@server:path)") .form-group %label.col-md-2.control-label = _('SCM credentials')