Description of problem: It is not possible to use GIT repository for Ansible playbooks via SSH using custom port without editing the SSH configs via CLI. In CFME version 4.5 and lower, it was possible to achieve this via adding the host with custom port to .ssh/config in awx user home. In CFME 4.6b, the .ssh/config file is ignored so to achieve the same thing it is possible to do it via /etc/ssh/ssh_config. In the GUI, if the port is used in the address [1], the tool interprets the port as part of the path, so this workaround doesn't work. The option to set the custom SSH port would be very useful. [1] git@<server>:<port><path_to_repo> Version-Release number of selected component (if applicable): N/A How reproducible: 100% Steps to Reproduce: 1. 2. 3. Actual results: Not able to connect GIT repo via SSH connection using the GUI only. The config files on the OS must be edited to achieve this. Expected results: To be able to set the custom SSH port via GUI
Created attachment 1402744 [details] Created a project/repo using custom port
Created attachment 1402745 [details] 3 playbooks found in the git repo
Vladimir, The git server is not accessible somehow. I set up my own and I am able to add it. I am able to add using both https and ssh* with the custom port in the url. See the attached screen shots for the ssh one. ssh*: UI doesn't allow `ssh` protocol url. So I did that using rails console. So if you problem is with https custom-port, I cannot reproduce it. If your issue is with the 'ssh'. Please assign to UI team to enable that. Let me know if question. Thanks, James
(In reply to James Wong from comment #11) > Vladimir, > > The git server is not accessible somehow. I set up my own and I am able to > add it. I am able to add using both https and ssh* with the custom port in > the url. See the attached screen shots for the ssh one. > > ssh*: UI doesn't allow `ssh` protocol url. So I did that using rails console. > > > So if you problem is with https custom-port, I cannot reproduce it. If your > issue is with the 'ssh'. Please assign to UI team to enable that. > > Let me know if question. > > Thanks, > James Hi. Ok. THis problem is related to the custom port on ssh. I am going to reassign the BZ. Thanks, Vladimir
Created attachment 1413718 [details] API call takes scm_url correctly
So, the problem is this: git@<server>:<port><path_to_repo> is *not* a valid way of specifying a server with port. `ssh server:port` will try resolving server:port as one hostname `git clone server:port/path` will try connecting to server, and cloning port/path So, that part of the behavior is completely correct :). The way to specify a git url with custom port is using the ssh:// protocol: `git clone ssh://server:port/path` does do the right thing. But unfortunately we only allow pure ssh paths (which don't support ports) and http/https URIs (which don't use the right protocol). The solution here will be to add support for specifying the ssh:// protocol in the UI.
https://github.com/ManageIQ/manageiq-ui-classic/pull/3694
New commit detected on ManageIQ/manageiq-ui-classic/master: https://github.com/ManageIQ/manageiq-ui-classic/commit/109a93e12bbbda4f2c20269763c37b5256d3cf6b commit 109a93e12bbbda4f2c20269763c37b5256d3cf6b Author: Zita Nemeckova <znemecko> AuthorDate: Wed Mar 28 08:36:18 2018 -0400 Commit: Zita Nemeckova <znemecko> CommitDate: Wed Mar 28 08:36:18 2018 -0400 Allow scm_url to take ssh with ssh protocol Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1540551 Allows http, https, ssh protocols. Allows ssh without protocol. app/assets/javascripts/directives/url_validation.js | 18 +- app/views/ansible_repository/_repository_form.html.haml | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-)
Able to add repo with git server running on different port. Verified Version: 5.10.0.32.20190115185124_c957ada