mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 03:38:15 +00:00 
			
		
		
		
	adding defaultGceKey in remote/ssh.go
Signed-off-by: Namanl2001 <namanlakhwani@gmail.com>
This commit is contained in:
		@@ -48,7 +48,7 @@ system_spec_name=${SYSTEM_SPEC_NAME:-}
 | 
			
		||||
extra_envs=${EXTRA_ENVS:-}
 | 
			
		||||
runtime_config=${RUNTIME_CONFIG:-}
 | 
			
		||||
ssh_user=${SSH_USER:-${USER}}
 | 
			
		||||
ssh_key=${SSH_KEY:-${GCE_SSH_PRIVATE_KEY_FILE:-${USER}/.ssh/google_compute_engine}}
 | 
			
		||||
ssh_key=${SSH_KEY:-}
 | 
			
		||||
 | 
			
		||||
# Parse the flags to pass to ginkgo
 | 
			
		||||
ginkgoflags=""
 | 
			
		||||
 
 | 
			
		||||
@@ -44,8 +44,12 @@ func init() {
 | 
			
		||||
	sshOptionsMap = map[string]string{
 | 
			
		||||
		"gce": "-o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o CheckHostIP=no -o StrictHostKeyChecking=no -o ServerAliveInterval=30 -o LogLevel=ERROR",
 | 
			
		||||
	}
 | 
			
		||||
	defaultGceKey := os.Getenv("GCE_SSH_PRIVATE_KEY_FILE")
 | 
			
		||||
	if defaultGceKey == "" {
 | 
			
		||||
		defaultGceKey = fmt.Sprintf("%s/.ssh/google_compute_engine", usr.HomeDir)
 | 
			
		||||
	}
 | 
			
		||||
	sshDefaultKeyMap = map[string]string{
 | 
			
		||||
		"gce": fmt.Sprintf("%s/.ssh/google_compute_engine", usr.HomeDir),
 | 
			
		||||
		"gce": defaultGceKey,
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user