Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Commit

Permalink
update search path for 'ssh.exe'
Browse files Browse the repository at this point in the history
bz 1294401
bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1294401

'rhc ssh <app>' fails with Windows 10 Home Edition because rhc does
not recognize 'C:\Program Files\Git\usr\bin\ssh.exe' as a possible
location for 'ssh.exe'.  Updated to add this path.  Also, updated the
Git install site recommendation since the current site is obsolete.
  • Loading branch information
sallyom committed Jan 22, 2016
1 parent 5ac7150 commit a03c5c8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/rhc/commands/git_clone.rb
Expand Up @@ -23,7 +23,7 @@ def run(app_name)

0
else
error "You do not have git installed. In order to fully interact with OpenShift you will need to install and configure a git client.#{RHC::Helpers.windows? ? ' We recommend this free application: Git for Windows - a basic git command line and GUI client http://msysgit.github.io/.' : ''}"
error "You do not have git installed. In order to fully interact with OpenShift you will need to install and configure a git client.#{RHC::Helpers.windows? ? ' We recommend this free application: Git for Windows - a basic git command line and GUI client https://git-for-windows.github.io/.' : ''}"
2
end
end
Expand Down
6 changes: 4 additions & 2 deletions lib/rhc/ssh_helpers.rb
Expand Up @@ -461,9 +461,11 @@ def discover_ssh_executable
# looks for ssh.exe from msysgit or plink.exe from PuTTY, either on path or specific locations
guessing_locations <<
discover_windows_executables do |base|
[
from_path = ENV['PATH'].split(File::PATH_SEPARATOR).map {|p| p + File::ALT_SEPARATOR + "ssh.exe" }
from_path + [
'ssh.exe',
"#{base}\\Git\\bin\\ssh.exe",
"#{base}\\Git\\usr\\bin\\ssh.exe",
"#{base}\\ssh.exe",
'plink.exe',
"#{base}\\PuTTY\\plink.exe",
Expand Down Expand Up @@ -495,7 +497,7 @@ def discover_ssh_executable
def check_ssh_executable!(path)
if not path
discover_ssh_executable.tap do |ssh_cmd|
raise RHC::InvalidSSHExecutableException.new("No system SSH available. Please use the --ssh option to specify the path to your SSH executable, or install SSH.#{windows? ? ' We recommend this free application: Git for Windows - a basic git command line and GUI client http://msysgit.github.io/.' : ''}") unless ssh_cmd or has_ssh?
raise RHC::InvalidSSHExecutableException.new("No system SSH available. Please use the --ssh option to specify the path to your SSH executable, or install SSH.#{windows? ? ' We recommend this free application: Git for Windows - a basic git command line and GUI client https://git-for-windows.github.io/.' : ''}") unless ssh_cmd or has_ssh?
end
else
bin_path = split_path(path)[0]
Expand Down
2 changes: 1 addition & 1 deletion lib/rhc/wizard.rb
Expand Up @@ -631,7 +631,7 @@ def windows_install
We recommend these free applications:
* Git for Windows - a basic git command line and GUI client http://msysgit.github.io/
* Git for Windows - a basic git command line and GUI client https://git-for-windows.github.io/
* TortoiseGit - git client that integrates into the file explorer http://code.google.com/p/tortoisegit/
EOF
Expand Down

0 comments on commit a03c5c8

Please sign in to comment.