Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-3372

User friendly error message for git access to Stash via SSH

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • SSH
    • None
    • 0
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      SSH session hangs or terminates!
      With the SSH deployed with GIT 18. we get the following from a debug trace....

      $ ssh -T git@github.com
      debug1: Authentication succeeded (publickey).
      debug1: channel 0: new [client-session]
      debug2: channel 0: send open
      debug1: Entering interactive session.
      debug2: callback start
      debug2: client_session2_setup: id 0
      debug2: channel 0: request pty-req confirm 0
      debug2: channel 0: request shell confirm 0
      debug2: fd 3 setting TCP_NODELAY
      debug2: callback done
      debug2: channel 0: open confirm rwindow 2097152 rmax 32768
      dispatch_protocol_error: type 100 seq 8
      From SSH running under the latest CygWin we get...
      debug1: Authentication succeeded (publickey).
      Authenticated to lhujira01v ([10.235.112.135]:9094).
      debug1: channel 0: new [client-session]
      debug3: ssh_session2_open: channel_new: 0
      debug2: channel 0: send open
      debug1: Entering interactive session.
      debug2: callback start
      debug2: fd 3 setting TCP_NODELAY
      debug3: packet_set_tos: set IP_TOS 0x10
      debug2: client_session2_setup: id 0
      debug2: channel 0: request pty-req confirm 1
      debug2: channel 0: request shell confirm 1
      debug2: callback done
      debug2: channel 0: open confirm rwindow 2097152 rmax 32768
      debug2: channel_input_status_confirm: type 99 id 0
      debug2: PTY allocation request accepted on channel 0
      debug2: channel_input_status_confirm: type 100 id 0
      shell request failed on channel 0
      

      And the same results from the SSH client on the Red Hat Enterprise server that Stash is installed on.

      This is expected because it should not be possible to get a remote shell via Stash (we use http://mina.apache.org/sshd-project/index.html for SSH). SSH is implemented such that it supports running a set of 3 specific git commands and "who am i" for troubleshooting. In addition, users can build plugins to integrate with our SSH support to add more commands if they want to.

      However, it would be nice to have a more meaningful error message; It would be preferable if the message comming back from the service was more meaningful - i.e. "Shell access not supported! Please issue Git commands only?" because that could save a couple of hours of frustration trying to figure this out

              Unassigned Unassigned
              mmangier Malik Mangier (Inactive)
              Votes:
              4 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: