Hi,
I try to clone a git repository from openshift with the following code:
var nodegit = require("nodegit");
var Git = function (sshUrl) {
this._sshUrl = sshUrl;
}
Git.prototype.clone = function (cb) {
console.log(__dirname)
var sshKeySet = nodegit.Cred.sshKeyNew,
user = 'username',
pass = 'pass',
path = '/tmp/somewhere',
publickey = __dirname + '/ssh.pub',
privatekey = __dirname + '/ssh',
options = {
remoteCallbacks: {
credentials: function () {
return sshKeySet(user, publickey, privatekey, pass);
}
}
};
nodegit.Clone.clone(this._sshUrl, 'tmp', options).then(function (repo) {
console.log('repo');
console.log('done')
}, function () {
console.log(arguments);
});
};
var git = new Git('ssh://id@url.rhcloud.com/~/git/appname.git');
git.clone(function () {
console.log('callback');
});
But the code does not connect to ssh. The following error will be thrown:
{ '0': [Error: Failed to start SSH session: Failed getting banner] }
Is there a solution for it?
Cheers,
Björn
Hi,
I try to clone a git repository from openshift with the following code:
But the code does not connect to ssh. The following error will be thrown:
{ '0': [Error: Failed to start SSH session: Failed getting banner] }
Is there a solution for it?
Cheers,
Björn