Skip to content

Commit 8e6e447

Browse files
committed
Merge pull request #390 from nodegit/update-libgit2-0.22.0
Update to libgit2 v0.22.1
2 parents 8b62cc2 + 7e588e2 commit 8e6e447

32 files changed

+415
-283
lines changed

examples/clone.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,15 @@ fse.remove(path).then(function() {
99
nodegit.Clone.clone(
1010
"https://github.com/nodegit/nodegit.git",
1111
path,
12-
{ ignoreCertErrors: 1})
12+
{
13+
remoteCallbacks: {
14+
certificateCheck: function() {
15+
// github will fail cert check on some OSX machines
16+
// this overrides that check
17+
return 1;
18+
}
19+
}
20+
})
1321
.then(function(repo) {
1422
return repo.getCommit("59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5");
1523
})

examples/cloneFromGithubWith2Factor.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ var opts = { ignoreCertErrors: 1};
2525
var repoUrl = "https://github.com/" + repoOwner + "/" + repoName + ".git";
2626

2727
var opts = {
28-
ignoreCertErrors: 1,
2928
remoteCallbacks: {
3029
credentials: function() {
3130
return nodegit.Cred.userpassPlaintextNew (token, "x-oauth-basic");
31+
},
32+
certificateCheck: function() {
33+
return 1;
3234
}
3335
}
3436
};

examples/pull.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@ nodegit.Repository.open(path.resolve(__dirname, repoDir))
1313
return repository.fetchAll({
1414
credentials: function(url, userName) {
1515
return nodegit.Cred.sshKeyFromAgent(userName);
16+
},
17+
certificateCheck: function() {
18+
return 1;
1619
}
17-
}, true);
20+
});
1821
})
1922
// Now that we're finished fetching, go ahead and merge our local branch
2023
// with the new one

0 commit comments

Comments
 (0)