File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed
Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -11,24 +11,18 @@ var repoName = "{The name of the repo}";
1111// over https, it can't be done with actual 2 factor.
1212// https://github.com/blog/1270-easier-builds-and-deployments-using-git-over-https-and-oauth
1313
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-
2214// If the repo is public, you can use a callback instead
2315var repoUrl = "https://github.com/" + repoOwner + "/" + repoName + ".git" ;
2416
2517var 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+ }
3226 }
3327 }
3428} ;
You can’t perform that action at this time.
0 commit comments