resolve-git-remote

Resolves the remote url of the local git repository in the current folder.

resolve-git-remote

Resolves the remote url of the local git repository in the current folder.

npm install resolve-git-remote
var remote = require('resolve-git-remote');
 
remote(function (errremote) {
  // err will be set if no remote was found 
  console.log(remote);  // => 'thlorenz/resolve-git-remote' 
});

Code lifted from travisify.