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

XMLWordPrintable

    • 4
    • Severity 3 - Minor
    • 1

      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.

            Assignee:
            Unassigned
            Reporter:
            Caterina Curti
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: