var fs = require('fs')
var gitane = require('gitane')
var path = require('path')
// Use current working dir
var baseDir = process.cwd()
// Read private key from ~/.ssh/id_dsa
var privKey = fs.readFileSync(path.join(__dirname, 'striderci'), 'utf8');
gitane.run(baseDir, privKey, "git clone --recursive 'git@bitbucket.org:strickdj/test-repo.git' ./test --branch master",
function(err, stdout, stderr, exitCode) {
if (err) {
console.log("An error occurred: " + stderr)
process.exit(1)
}
console.log("Git clone complete!")
})
which produces the following:
`An error occurred: Cloning into './foo'...
conq: invalid command syntax.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.`
it works correctly when i remove the quotes around the repo.
I tried manually setting up a connection to bitbucket but it looks like the repo url is being incorrectly quoted in the git clone command.
I set up a test script with the following:
which produces the following: