Strider-CD / strider-github

Github provider for strider
25 stars 34 forks source link

Git Clone Invalid Syntax #77

Closed strickdj closed 7 years ago

strickdj commented 7 years ago

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.

strider-runner-core:job Job "588ce062920b8607c0eb1017" status: stderr { '0': 'stderr', '1': 'Cloning into \'.\'...\n' } +76ms strider-runner-core:job Job "588ce062920b8607c0eb1017" status: stderr { '0': 'stderr', '1': 'conq: invalid command syntax.\n' } +6s strider-runner-core:job Job "588ce062920b8607c0eb1017" status: stderr { '0': 'stderr', '1': 'f' } +2ms strider-runner-core:job Job "588ce062920b8607c0eb1017" status: stderr { '0': 'stderr', '1': 'atal: ' } +1ms strider-runner-core:job Job "588ce062920b8607c0eb1017" status: stderr { '0': 'stderr', '1': 'C' } +0ms strider-runner-core:job Job "588ce062920b8607c0eb1017" status: stderr { '0': 'stderr', '1': 'ould not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.' } +1ms strider-runner-core:job Job "588ce062920b8607c0eb1017" status: stderr { '0': 'stderr', '1': '\n' } +2ms strider-git Gitane error: process exited with status 128 +3ms strider-git gitane command done git clone --recursive 'git@bitbucket.org:strickdj/test-repo.git' . --branch master; exit code 128; duration 5995 +0ms

I set up a test script with the following: `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.

strickdj commented 7 years ago

Sorry I think this is the wrong repo.