Skip to content

Commit 25537ff

Browse files
author
houlin.cheng
committed
fix issue#207, Response code 401 (Unauthorized)
1 parent f3a4b4c commit 25537ff

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

options.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ var git = {
1515
},
1616
}
1717
};
18-
18+
1919
var options = (function () {
2020
var options = {
21+
host: git.config.get('gitlab.url') || process.env.GITLAB_URL,
2122
url: git.config.get('gitlab.url') || process.env.GITLAB_URL,
2223
token: git.config.get('gitlab.token') || process.env.GITLAB_TOKEN,
2324
};
24-
25+
2526
if (!options.url) {
2627
var defaultInput = (function () {
2728
var url = git.config.get('remote.origin.url');
@@ -37,7 +38,7 @@ var git = {
3738
}
3839
git.config.set('gitlab.url', options.url);
3940
}
40-
41+
4142
if (!options.token) {
4243
var url = options.url + '/profile/personal_access_tokens';
4344
console.log('A personal access token is needed to use the GitLab API\n' + url.grey);
@@ -50,8 +51,8 @@ var git = {
5051
}
5152

5253
options.rejectUnauthorized = false;
53-
54+
5455
return options;
5556
})();
5657

57-
module.exports = options
58+
module.exports = options

0 commit comments

Comments
 (0)