Created
July 6, 2020 17:31
-
-
Save adityadeshpande/f1632accf07f29057f66ecfc6a0ca13a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var config = { | |
"options": { | |
"privateKey": "<pathToPrivateKey>/MyKeyFile", | |
"publicKey": "<pathToPublicKey>/MyKeyFile.pub", | |
"passphrase": "Y0ur.P@5$p#rAse.G0e5.H3rE!", | |
"twoWaySync": true, | |
"sshUrl": "<get_this_sshUrl_from_git>", | |
"signature_name": "Someone's Name", | |
"signature_email": "SomeoneWho@isMakingThisCommit.dev" | |
} | |
} | |
function InitGit(options) { | |
debug.info("Initializing Git..."); | |
//Fetch values from config. | |
privateKey = options.privateKey; | |
publicKey = options.publicKey; | |
passphrase = options.passphrase; | |
twoWaySync = options.twoWaySync; | |
url = options.sshUrl; | |
signature_name = options.signature_name; | |
signature_email = options.signature_email; | |
credentialsCallback = { | |
credentials: function (url, userName) { | |
return nodegit.Cred.sshKeyNew(userName, publicKey, privateKey, passphrase); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment