使用gcloud source克隆代碼出錯的問題
使用gcloud source克隆代碼出錯的問題
gcloud source repos clone java-gae-quickstart --project=mytest-161202
在Google Cloud Platform中創建好代碼庫,並且在本機安裝好Google Cloud SDK之後,使用上面的語句克隆代碼庫出錯
Cloning into 'C:\Users\Me\default'...
ERROR: (gcloud.auth.git-helper) Invalid input line format: [path=].
fatal: remote error: Invalid username/password.
You may need to use your OAuth token password; Note that generated google.com passwords are not compatible with private repositories
ERROR: (gcloud.source.repos.clone) Command '['git', 'clone', 'https: //source.developers.google.com/p/project-1234/r/default', 'C:\Users\Me\default', '--config', 'credential.helper="gcloud.cmd"']' returned non-zero exit status 128
此時打開git,輸入git config --list
,查看其中的credential.helper屬性是否是manager,如果是,則輸入 git config --system --unset credential.helper
,之後再次取出應該就可以了
在GCP和git中設置代理的方法(取出時提示time out 443的情況下)
-
git
git config --global http.proxy 127.0.0.1:1080
-
gcloud
//查看配置信息
gcloud info
//設置代理
gcloud config set proxy/address 127.0.0.1
gcloud config set proxy/port 1080
gcloud config set proxy/type http
reference
Updated: 2022-12-10 21:21
Created: 2017-03-12 02:33