Skip to content

Failed getting Banner #328

@DaspawnW

Description

@DaspawnW

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions