Uploaded image for project: 'Skara'
  1. Skara
  2. SKARA-675

Exception in thread "main" java.lang.RuntimeException: Request returned bad status

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • None
    • cli
    • None

      When I try the command: "git fork https://github.com/openjdk/jdk" I get:

      # git fork https://github.com/openjdk/jdk
      Username for 'https://github.com': gerard-ziemski
      Password for 'https://gerard-ziemski@github.com':
      Sep 14, 2020 11:31:00 AM org.openjdk.skara.network.RestRequest transformBadResponse
      WARNING: org.openjdk.skara.network.RestRequest$QueryBuilder@6b9651f3
      Sep 14, 2020 11:31:00 AM org.openjdk.skara.network.RestRequest transformBadResponse
      WARNING: {"message":"Bad credentials","documentation_url":"https://docs.github.com/rest"}
      Exception in thread "main" java.lang.RuntimeException: Request returned bad status: 401
      at org.openjdk.skara.network/org.openjdk.skara.network.RestRequest.transformBadResponse(RestRequest.java:285)
      at org.openjdk.skara.network/org.openjdk.skara.network.RestRequest.execute(RestRequest.java:358)
      at org.openjdk.skara.network/org.openjdk.skara.network.RestRequest$QueryBuilder.execute(RestRequest.java:156)
      at org.openjdk.skara.forge/org.openjdk.skara.forge.github.GitHubRepository.fork(GitHubRepository.java:239)
      at org.openjdk.skara.cli/org.openjdk.skara.cli.GitFork.main(GitFork.java:284)
      at org.openjdk.skara.cli/org.openjdk.skara.cli.GitSkara.main(GitSkara.java:230)

      I am assuming, by looking at the output, that the username/password combo is wrong (though why that is is a different issue), but we should be catching such scenario and printing a helpful message pointing the user to what to check for and suggest on how to fix it.

            ehelin Erik Helin
            gziemski Gerard Ziemski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: