Merge branch 'V3.7' of https://github.com/goodrain/rainbond into V3.7

This commit is contained in:
barnettZQG 2018-10-12 12:30:26 +08:00
commit 7c4a27de4b

View File

@ -423,13 +423,14 @@ func GetPrivateFile(tenantID string) string {
if home == "" {
home = "/root"
}
if tenantID == "builder_rsa" {
if ok, _ := util.FileExists(path.Join(home, "/.ssh/"+tenantID)); ok {
return path.Join(home, "/.ssh/"+tenantID)
} else {
if ok, _ := util.FileExists(path.Join(home, "/.ssh/builder_rsa")); ok {
return path.Join(home, "/.ssh/builder_rsa")
}
return path.Join(home, "/.ssh/id_rsa")
}
return path.Join(home, "/.ssh/"+tenantID)
}