Git 整合中的 HTTP Proxy 支援

TM1 Server 連接以取得 Git 整合功能的 Git 儲存庫,經常受防火牆保護,且只能透過 HTTP Proxy 才能呼叫到。 TM1 Server 上支援 Proxy 存取。

Proxy 支援是透過 Git http.proxy 參數來提供,該參數定義於 https://git-scm.com/docs/git-config

呼叫動作 GitInitGitDeploy 時,http.proxy 指定 HTTP Proxy 的 URL。 Proxy 會將資料流量遞送至由 URL 參數(使用 HTTPS 通訊協定)指定的 Git 儲存庫。

例如,此 GitInit 會透過 http://localhost:8888 Proxy 將資料流量遞送至 https://github.com/GithubaccountXXX/RepoXXX.git 處的儲存庫。

POST /api/v1/GitInit
{
 "URL": "https://github.com/GithubAccountXXX/RepoXXX.git",
 "Deployment": "prod",
 "Username": "GitUserXXX",
 "Password": "xxx",
 "Config":
 {
   "http.proxy": "http://localhost:8888"
 }
}