Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/utils/ini.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/utils/ini.js b/lib/utils/ini.js
index b5dd342f8..a250228a6 100644
--- a/lib/utils/ini.js
+++ b/lib/utils/ini.js
@@ -162,6 +162,9 @@ function decryptAuth (config, cb) {
}
function encryptAuth (config, cb) {
+ if (config.username && config._password) {
+ config._auth = base64.encode(config.username+":"+config._password)
+ }
delete config.username
delete config._password
return cb(null, config)