We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1422027 commit f6d299fCopy full SHA for f6d299f
1 file changed
test/tests/remote.js
@@ -249,9 +249,21 @@ describe("Remote", function() {
249
.then(function(remote) {
250
var ref = "refs/heads/" + branch;
251
var refs = [ref + ":" + ref];
252
+ var firstPass = true;
253
var options = {
254
callbacks: {
- credentials: function(url, userName, allowedTypes) {},
255
+ credentials: function(url, userName) {
256
+ if (firstPass) {
257
+ firstPass = false;
258
+ if (url.indexOf("https") === -1) {
259
+ return NodeGit.Cred.sshKeyFromAgent(userName);
260
+ } else {
261
+ return NodeGit.Cred.userpassPlaintextNew(userName, "");
262
+ }
263
264
+ return NodeGit.Cred.defaultNew();
265
266
+ },
267
certificateCheck: function() {
268
return 1;
269
}
0 commit comments