缓存git 用户名、密码
(sshRemote common.SSHRemote, containerId string, workspaceInfo workspace.WorkspaceInfo)
| 437 | |
| 438 | // 缓存git 用户名、密码 |
| 439 | func remoteContainerCredentialCache(sshRemote common.SSHRemote, containerId string, workspaceInfo workspace.WorkspaceInfo) { |
| 440 | |
| 441 | if workspaceInfo.GitRepoAuthType != workspace.GitRepoAuthType_Basic { |
| 442 | return |
| 443 | } |
| 444 | |
| 445 | command := fmt.Sprintf(` docker exec -d %v /bin/sh -c \"git config --global user.name '%v' && git config --global user.password '%v' && git config --global credential.helper store\"`, |
| 446 | containerId, workspaceInfo.GitUserName, workspaceInfo.GitPassword) |
| 447 | |
| 448 | sshRemote.ExecSSHCommandRealTime(command) |
| 449 | |
| 450 | } |
| 451 | |
| 452 | // 打印 service 列表 |
| 453 | func printServices(services map[string]compose.Service) { |
no test coverage detected