Skip to content

Show Kerberos clone URL when Kerberos enabled and Kerberos URL different than HTTP URL

As Kerberos authentication is available, this Merge Request provides the functionality to show the Kerberos clone URL in the project's main page when Kerberos authentication is enabled and the Kerberos URL is different than the HTTP URL. This can happen when we configure Kerberos in a dedicated port.
However due to a known bug in Curl, for the Kerberos clone URL to work, has to include ":@" to emulate an empty username and password. This is documented in http://sourceforge.net/p/curl/bugs/440/ and http://curl.haxx.se/docs/knownbugs.html
Also the logic implemented in app/assets/javascripts/project.js.coffee assumed that only two buttons are shown (SSH & HTTP). It had to be modified to have the 3rd button for Kerberos, otherwise the focus was not working properly: When clicking in any of the non active protocols by default (HTTP or Kerberos), both buttons where taking the focus.
Screen-shots on how the project's UI looks like before and after this feature is implemented are provided.
Note that even with this feature included, if Kerberos is not enabled, the UI looks the same as without this feature.
To activate Kerberos and see the 3rd URL:

  ## Kerberos settings  
  kerberos:  
    # Allow the HTTP Negotiate authentication method for Git clients  
    enabled: true    

Current or Kerberos disabled:
before-kerberos

Proposed (when Kerberos enabled):
after-kerberos2

Merge request reports