Skip to content

Commit 1e5e2a4

Browse files
committed
Merge pull request #7 from PhearZero/remove_repo_replace
Commenting out the replace for git@ addresses to allow for key based …
2 parents a3ae249 + c71a2eb commit 1e5e2a4

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

lib/cli.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ var colors = { red:'\u001b[31m', blue:'\u001b[34m', reset: '\u001b[0m' },
33
util = require('util'),
44
fs = require('fs'),
55
path = require('path'),
6+
url = require('url'),
67
loadGruntTasks = require('load-grunt-tasks'),
78
semver = require('semver'),
89
mkdirp = require('mkdirp'),
@@ -71,11 +72,21 @@ var repoUpdated = false;
7172

7273
if(config.repo) {
7374

74-
config.repo = config.repo.replace(/@(.+)$/, function(all, ref) {
75+
//Get the repoRef
76+
config.repo.replace(/@(.+)$/, function(all, ref) {
7577
repoRef = ref;
7678
return '';
7779
});
7880

81+
//Parse the config repository
82+
var resURL = url.parse(config.repo);
83+
84+
//If the repo config has the authentication in the URL, remove the authentication
85+
if( resURL.auth ){
86+
resURL.auth = null;
87+
config.repo = url.format(resURL);
88+
}
89+
7990
exec("git --version", function(nogit, out) {
8091
if(nogit)
8192
exit("Install 'git' to use the repo field");

0 commit comments

Comments
 (0)