diff --git a/source/git-api.js b/source/git-api.js index 962d01a51..8efd9a354 100644 --- a/source/git-api.js +++ b/source/git-api.js @@ -649,10 +649,10 @@ exports.registerApi = (env) => { }); app.get(`${exports.pathPrefix}/remotes`, ensureAuthenticated, ensurePathExists, (req, res) => { - jsonResultOrFailProm( - res, - gitPromise(['remote'], req.query.path).then(gitParser.parseGitRemotes) - ); + let pathToRepo = req.query.path; + nodegit.Repository.open(pathToRepo).then(function (repo) { + jsonResultOrFailProm(res, nodegit.Remote.list(repo)); + }); }); app.get(