libgit2 / node-gitteh

Node.js bindings for libgit2
http://libgit2.github.com
MIT License
431 stars 56 forks source link

{ [Error: This transport isn't implemented. Sorry] code: 11 } #62

Open kuno opened 11 years ago

kuno commented 11 years ago

I made a slight modification to the examples/show_remote.js,

var gitteh = require("../lib/gitteh");
var path = require("path");

gitteh.openRepository(path.join(__dirname, ".."), function(err, repo) {
    exports.repo = repo;

    repo.remote("origin", function(err, remote) {
        exports.remote = remote;

        remote.connect("fetch", function(err) {
            if(err) return console.error(err);
            console.log(remote);
            console.log(remote.connected);
            console.log(remote.refs);
        });
    });
});

When I running it , I got this error:

{ [Error: This transport isn't implemented. Sorry] code: 11 }
kuno commented 11 years ago

It seems this is an error occurs at the c++ level?

mildsunrise commented 11 years ago

Can you do a git remote -v show so we can see which URL is it trying to fetch? Maybe it's an FTP one which LibGit2 doesn't support(?) right now.

kuno commented 11 years ago

It was strange, I try again, this time I got another error:


/Users/kuno/Hub/_/node-gitteh/lib/gitteh.js:418
    fetchSpec = new Refspec(nativeRemote.fetchSpec.src, nativeRemote.fetchSpec
                                                  ^
TypeError: Cannot read property 'src' of undefined
    at new Gitteh.Remote (/Users/kuno/Hub/_/node-gitteh/lib/gitteh.js:418:51)
    at Repository.remote (/Users/kuno/Hub/_/node-gitteh/lib/gitteh.js:855:23)
    at wrapCallback (/Users/kuno/Hub/_/node-gitteh/lib/gitteh.js:76:17)

And this is the result of git remtoe -v show, nothing interesting though, I believed.

origin  git@github.com:libgit2/node-gitteh.git (fetch)
origin  git@github.com:libgit2/node-gitteh.git (push)
kuno commented 11 years ago

BTW, I have found any documents teaching me how to add new file/commit/fetch/push/pull by using gitteh.

If you know how, can you show me some example?