)]}'
{
  "commit": "7ac1bfc834fe65b7e86e8f54f1f5025df90f8a92",
  "tree": "7f176addef01551cc3930068d9a82df5ff8a8e8c",
  "parents": [
    "231f5d9baf8502e581605c645b4a11bbc904a314"
  ],
  "author": {
    "name": "Thomas Wolf",
    "email": "thomas.wolf@paranor.ch",
    "time": "Fri Jun 16 10:25:53 2017 +0200"
  },
  "committer": {
    "name": "Thomas Wolf",
    "email": "thomas.wolf@paranor.ch",
    "time": "Tue Aug 22 23:57:09 2017 +0200"
  },
  "message": "Do authentication re-tries on HTTP POST\n\nThere is at least one git server out there (GOGS) that does\nnot require authentication on the initial GET for\ninfo/refs?service\u003dgit-receive-pack but that _does_ require\nauthentication for the subsequent POST to actually do the push.\n\nThis occurs on GOGS with public repositories; for private\nrepositories it wants authentication up front.\n\nHandle this behavior by adding 401 handling to our POST request.\nNote that this is suboptimal; we\u0027ll re-send the push data at\nleast twice if an authentication failure on POST occurs. It\nwould be much better if the server required authentication\nup-front in the GET request.\n\nAdded authentication unit tests (using BASIC auth) to the\nSmartClientSmartServerTest:\n\n- clone with authentication\n- clone with authentication but lacking CredentialsProvider\n- clone with authentication and wrong password\n- clone with authentication after redirect\n- clone with authentication only on POST, but not on GET\n\nAlso tested manually in the wild using repositories at try.gogs.io.\nThat server offers only BASIC auth, so the other paths\n(DIGEST, NEGOTIATE, fall back from DIGEST to BASIC) are untested\nand I have no way to test them.\n\n* public repository: GET unauthenticated, POST authenticated\n  Also tested after clearing the credentials and then entering a\n  wrong password: correctly asks three times during the HTTP\n  POST for user name and password, then gives up.\n* private repository: authentication already on GET; then gets\n  applied correctly initially to the POST request, which succeeds.\n\nAlso fix the authentication to use the credentials for the redirected\nURI if redirects had occurred. We must not present the credentials\nfor the original URI in that case. Consider a malicious redirect A-\u003eB:\nthis would allow server B to harvest the user credentials for server\nA. The unit test for authentication after a redirect also tests for\nthis.\n\nBug: 513043\nChange-Id: I97ee5058569efa1545a6c6f6edfd2b357c40592a\nSigned-off-by: Thomas Wolf \u003cthomas.wolf@paranor.ch\u003e\nSigned-off-by: Matthias Sohn \u003cmatthias.sohn@sap.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "421fa8ad6157642396ca9d45d852338cd495b9ed",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit.http.test/META-INF/MANIFEST.MF",
      "new_id": "08bd0ef14f73685eda69168dc377cdf267a9a73a",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit.http.test/META-INF/MANIFEST.MF"
    },
    {
      "type": "modify",
      "old_id": "8cadca5235615b41803f25476a220d43f76e8d01",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java",
      "new_id": "1b0c6949a97d1dc0c7127cea67c7d3185dd105d7",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java"
    },
    {
      "type": "modify",
      "old_id": "69e2cd5957d236871a52acfc4d4b6c150f74fa1d",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java",
      "new_id": "e257cf65b6f285e6865f457aa39e0421a221ba68",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java"
    },
    {
      "type": "modify",
      "old_id": "bf2a4a2e0f7fb76860551115aa33363164f42f8f",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties",
      "new_id": "c532b328db6347fb091f70c0c0cb27fcea2b022e",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties"
    },
    {
      "type": "modify",
      "old_id": "07666eb934d58abaeafa29267a00bebb00a8a557",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java",
      "new_id": "5acf0587645f5a7fa1117330d26dff44078d5615",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java"
    },
    {
      "type": "modify",
      "old_id": "327dc39c7f4c2ff27b5c0d849b6c198e41b7975c",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java",
      "new_id": "1647200e65adbbaafcd6036ca18540a04bf0ffcb",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java"
    }
  ]
}
