Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2 package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nodegit",
"description": "Node.js libgit2 asynchronous native bindings",
"version": "0.15.1",
"version": "0.16.0",
"homepage": "http://nodegit.org",
"keywords": [
"libgit2",
Expand Down
18 changes: 18 additions & 0 deletions 18 test/tests/cred.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var assert = require("assert");
var path = require("path");
var fs = require("fs");
var local = path.join.bind(path, __dirname);

describe("Cred", function() {
Expand All @@ -23,6 +24,23 @@ describe("Cred", function() {
assert.ok(cred instanceof NodeGit.Cred);
});

it("can create ssh credentials using passed keys in memory", function() {
var publicKeyContents = fs.readFileSync(sshPublicKey, {
encoding: "ascii"
});
var privateKeyContents = fs.readFileSync(sshPrivateKey, {
encoding: "ascii"
});

return NodeGit.Cred.sshKeyMemoryNew(
"username",
publicKeyContents,
privateKeyContents,
"").then(function(cred) {
assert.ok(cred instanceof NodeGit.Cred);
});
});

it("can create credentials using plaintext", function() {
var plaintextCreds = NodeGit.Cred.userpassPlaintextNew
("username", "password");
Expand Down
1 change: 1 addition & 0 deletions 1 vendor/libgit2.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"defines": [
"GIT_THREADS",
"GIT_SSH",
"GIT_SSH_MEMORY_CREDENTIALS",
# Node's util.h may be accidentally included so use this to guard
# against compilation error.
"SRC_UTIL_H_",
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.