Skip to content

Commit a6ab979

Browse files
committed
Unable to find gitolite version when PTY allocation is denied
The defaut gitolite behaviour is to set authorized keys with "no-pty" option. Trying an SSH connection without a command execute a login shell which output "Pseudo-terminal will not be allocated because stdin is not a terminal" error message in addition to the result of the "info" command. * lib/libs/git_hosting.rb (GitHosting.gitolite_version): run the "info" command explicitly. * lib/libs/git_hosting.rb (GitHosting.gitolite_version_output): Ditoo.
1 parent 5055522 commit a6ab979

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: lib/libs/git_hosting.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def self.file_exists?(filename)
229229

230230

231231
def self.gitolite_version
232-
stdin, stdout, stderr = Open3.popen3("#{GitHosting.gitolite_ssh} #{GitHosting.git_user}@localhost")
232+
stdin, stdout, stderr = Open3.popen3("#{GitHosting.gitolite_ssh} #{GitHosting.git_user}@localhost info")
233233

234234
if !stderr.readlines.blank?
235235
return -1
@@ -249,7 +249,7 @@ def self.gitolite_version
249249

250250

251251
def self.gitolite_version_output
252-
stdin, stdout, stderr = Open3.popen3("#{GitHosting.gitolite_ssh} #{GitHosting.git_user}@localhost")
252+
stdin, stdout, stderr = Open3.popen3("#{GitHosting.gitolite_ssh} #{GitHosting.git_user}@localhost info")
253253

254254
errors = stderr.readlines
255255
if !errors.blank?

0 commit comments

Comments
 (0)