mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add support for GIT_SSH on older levels of git
This commit is contained in:
parent
8d98b228ab
commit
aebe080e85
@ -392,9 +392,9 @@ module.exports = function(grunt) {
|
|||||||
mode: '755'
|
mode: '755'
|
||||||
},
|
},
|
||||||
release: {
|
release: {
|
||||||
// Target-specific file/dir lists and/or options go here.
|
|
||||||
src: [
|
src: [
|
||||||
path.resolve('<%= paths.dist %>/node-red-<%= pkg.version %>/nodes/core/hardware/nrgpio*')
|
path.resolve('<%= paths.dist %>/node-red-<%= pkg.version %>/nodes/core/hardware/nrgpio*'),
|
||||||
|
path.resolve('<%= paths.dist %>/node-red-<%= pkg.version %>/red/runtime/storage/localfilesystem/projects/git/node-red-*sh')
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -105,6 +105,10 @@ function runGitCommandWithSSHCommand(args,cwd,auth) {
|
|||||||
commandEnv.NODE_RED_GIT_NODE_PATH = process.execPath;
|
commandEnv.NODE_RED_GIT_NODE_PATH = process.execPath;
|
||||||
commandEnv.NODE_RED_GIT_SOCK_PATH = rs.path;
|
commandEnv.NODE_RED_GIT_SOCK_PATH = rs.path;
|
||||||
commandEnv.NODE_RED_GIT_ASKPASS_PATH = path.join(__dirname,"authWriter.js");
|
commandEnv.NODE_RED_GIT_ASKPASS_PATH = path.join(__dirname,"authWriter.js");
|
||||||
|
// For git < 2.3.0
|
||||||
|
commandEnv.GIT_SSH = path.join(__dirname,"node-red-ssh.sh");
|
||||||
|
commandEnv.NODE_RED_KEY_FILE=auth.key_path;
|
||||||
|
// GIT_SSH_COMMAND - added in git 2.3.0
|
||||||
commandEnv.GIT_SSH_COMMAND = "ssh -i " + auth.key_path + " -F /dev/null";
|
commandEnv.GIT_SSH_COMMAND = "ssh -i " + auth.key_path + " -F /dev/null";
|
||||||
// console.log('commandEnv:', commandEnv);
|
// console.log('commandEnv:', commandEnv);
|
||||||
return runGitCommand(args,cwd,commandEnv).finally(function() {
|
return runGitCommand(args,cwd,commandEnv).finally(function() {
|
||||||
|
1
red/runtime/storage/localfilesystem/projects/git/node-red-ssh.sh
Executable file
1
red/runtime/storage/localfilesystem/projects/git/node-red-ssh.sh
Executable file
@ -0,0 +1 @@
|
|||||||
|
ssh -i "$NODE_RED_KEY_FILE" -F /dev/null $@
|
Loading…
Reference in New Issue
Block a user