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

When connecting to Github to import a repository, the authentication fails but no "404 Not Found" messages are added to logs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 4.10.1, 4.11.0
    • Repository - Import
    • None

    Description

      Summary

      The unsuccessful authentication with Github (github.com and GitHub Enterprise) may lead to a 404 status code being returned.

      This information is not added to the log files unless the org.apache.http debug log level is enabled.

       

      Steps to Reproduce

      1. In the repository importer dialog, select:
        1. GitHub -> GitHub Enterprise (self-hosted) or GitHub (github.com)
        2. Enter the Username and the Personal access token

      Note: this problem has only been observed when the username contains a ., which is not a valid character for a username in GitHub but can still be used when integrating with third party authentication products (e.g. LDAP).

       

      Expected Results

      The authentication fails with a message to the user and a log line.

       

      Actual Results

      The below exception is thrown in the atlassian-bitbucket.log file when the org.apache.http debug log level is enabled:

      DEBUG [I/O dispatcher 34] org.apache.http.wire http-outgoing-32 >> "HEAD /api/v3/users/<user.name> HTTP/1.1[\r][\n]"
      DEBUG [I/O dispatcher 34] org.apache.http.wire http-outgoing-32 << "HTTP/1.1 404 Not Found[\r][\n]"
      

       

      Workaround

      Perform the authentication by using user-name as username instead of user.name.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ccurti Caterina Curti
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Backbone Issue Sync