Skip to content

Commit 2a02612

Browse files
committed
Merge pull request #34 from lzrski/patch-1
FIX: SSH w/ Agent guide uses remoteCallbacks API
2 parents 03a4c4c + ba7d309 commit 2a02612

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

guides/cloning/ssh-with-agent/index.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ or where you execute it from.
6969
The third argument to the `clone` method is an optional simple object.
7070

7171
``` javascript
72-
var cloneOptions = {};
72+
var cloneOptions = {
73+
fetchOpts: {}
74+
};
7375
```
7476

7577
#### GitHub certificate issue in OS X
@@ -81,7 +83,7 @@ to passthrough the certificate check.
8183
*Note: this is not a problem with Windows or Linux*
8284

8385
``` javascript
84-
cloneOptions.remoteCallbacks = {
86+
cloneOptions.fetchOpts.callbacks = {
8587
certificateCheck: function() { return 1; }
8688
};
8789
```
@@ -95,10 +97,10 @@ This function will be attached below the above `certificateCheck`, and will
9597
respond back with the credentials from the agent. You'll notice we handle
9698
the second argument passed to credentials, `userName`.
9799

98-
The `remoteCallbacks` object now looks like this:
100+
The `fetchOpts.callbacks` object now looks like this:
99101

100102
``` javascript
101-
cloneOptions.remoteCallbacks = {
103+
cloneOptions.fetchOpts.callbacks = {
102104
certificateCheck: function() { return 1; },
103105
credentials: function(url, userName) {
104106
return NodeGit.Cred.sshKeyFromAgent(userName);

0 commit comments

Comments
 (0)