mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
parent
63829b6382
commit
fbec803129
@ -35,8 +35,8 @@ var authCache = require("./git/authCache");
|
|||||||
// TODO: DRY - red/api/editor/sshkeys !
|
// TODO: DRY - red/api/editor/sshkeys !
|
||||||
function getSSHKeyUsername(userObj) {
|
function getSSHKeyUsername(userObj) {
|
||||||
var username = '__default';
|
var username = '__default';
|
||||||
if ( userObj && userObj.name ) {
|
if ( userObj && userObj.username ) {
|
||||||
username = userObj.name;
|
username = userObj.username;
|
||||||
}
|
}
|
||||||
return username;
|
return username;
|
||||||
}
|
}
|
||||||
|
@ -76,6 +76,7 @@ function runGitCommand(args,cwd,env,emit) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
function runGitCommandWithAuth(args,cwd,auth,emit) {
|
function runGitCommandWithAuth(args,cwd,auth,emit) {
|
||||||
|
log.trace("runGitCommandWithAuth "+JSON.stringify(auth).replace(/("pass.*?"\s*:\s*").+?"/g,'$1[hidden]"'));
|
||||||
return authResponseServer(auth).then(function(rs) {
|
return authResponseServer(auth).then(function(rs) {
|
||||||
var commandEnv = clone(process.env);
|
var commandEnv = clone(process.env);
|
||||||
commandEnv.GIT_ASKPASS = path.join(__dirname,"node-red-ask-pass.sh");
|
commandEnv.GIT_ASKPASS = path.join(__dirname,"node-red-ask-pass.sh");
|
||||||
@ -93,6 +94,7 @@ function runGitCommandWithAuth(args,cwd,auth,emit) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function runGitCommandWithSSHCommand(args,cwd,auth,emit) {
|
function runGitCommandWithSSHCommand(args,cwd,auth,emit) {
|
||||||
|
log.trace("runGitCommandWithSSHCommand "+JSON.stringify(auth).replace(/("pass.*?"\s*:\s*").+?"/g,'$1[hidden]"'));
|
||||||
return sshResponseServer(auth).then(function(rs) {
|
return sshResponseServer(auth).then(function(rs) {
|
||||||
var commandEnv = clone(process.env);
|
var commandEnv = clone(process.env);
|
||||||
commandEnv.SSH_ASKPASS = path.join(__dirname,"node-red-ask-pass.sh");
|
commandEnv.SSH_ASKPASS = path.join(__dirname,"node-red-ask-pass.sh");
|
||||||
|
Loading…
Reference in New Issue
Block a user