Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git invalid command syntax #36

Open
strickdj opened this issue Jan 28, 2017 · 1 comment
Open

Git invalid command syntax #36

strickdj opened this issue Jan 28, 2017 · 1 comment

Comments

@strickdj
Copy link

strickdj commented Jan 28, 2017

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 '[email protected]: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 '[email protected]: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
Copy link
Author

I see in index.js -> sshUrl if the url has ssh:// it doesnt go down that path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant