| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,24 +11,18 @@ var repoName = "{The name of the repo}"; | |||
| 11 | 11 | // over https, it can't be done with actual 2 factor. | |
| 12 | 12 | // https://github.com/blog/1270-easier-builds-and-deployments-using-git-over-https-and-oauth | |
| 13 | 13 | ||
| 14 | - // The token has to be included in the URL if the repo is private. | ||
| 15 | - // Otherwise, github just wont respond, so a normal credential callback | ||
| 16 | - // wont work. | ||
| 17 | - var repoUrl = "https://" + token + | ||
| 18 | - ":x-oauth-basic@github.com/" + | ||
| 19 | - repoOwner + "/" + | ||
| 20 | - repoName + ".git"; | ||
| 21 | - | ||
| 22 | 14 | // If the repo is public, you can use a callback instead | |
| 23 | 15 | var repoUrl = "https://github.com/" + repoOwner + "/" + repoName + ".git"; | |
| 24 | 16 | ||
| 25 | 17 | var opts = { | |
| 26 | - remoteCallbacks: { | ||
| 27 | - credentials: function() { | ||
| 28 | - return nodegit.Cred.userpassPlaintextNew (token, "x-oauth-basic"); | ||
| 29 | - }, | ||
| 30 | - certificateCheck: function() { | ||
| 31 | - return 1; | ||
| 18 | + fetchOpts: { | ||
| 19 | + callbacks: { | ||
| 20 | + credentials: function() { | ||
| 21 | + return nodegit.Cred.userpassPlaintextNew(token, "x-oauth-basic"); | ||
| 22 | + }, | ||
| 23 | + certificateCheck: function() { | ||
| 24 | + return 1; | ||
| 25 | + } | ||
| 32 | 26 | } | |
| 33 | 27 | } | |
| 34 | 28 | }; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments