2016-06-28 7 views
3

私の個人的なプロジェクトをGCE(Google Compute Engine)にデプロイすると、Google Cloud Platformでgit repoを複製しようとしました。しかし、それは動作しませんでした。 GCPのgit repoは内部的にcode.google.comを使用しており、サービスアカウントと互換性がないと思います。それはあなたのGCEインスタンスが作成されたどのようにサービスアカウントを持つ `gcloud source repos clone`が動作しません

答えて

1

現在[email protected]ログインした画像は、Debianの(GCEのデフォルト)である

Cloning into '/home/...'... 
fatal: remote error: Invalid username/password. 
You may need to use your generated googlecode.com password; see https://code.google.com/hosting/settings 
ERROR: (gcloud.source.repos.clone) Command '['git', 'clone', 'https://source.developers.google.com/p/.../r/...', '/home/...', '--config', 'credential.helper="gcloud.sh"']' returned non-zero exit status 128 

を出力しますか?

スコープがhttps://www.googleapis.com/auth/source.full_controlであることを確認する必要があります。スコープを一覧表示するには、あなたがgcloud command to create the instanceを使用した場合は、元の範囲を含めるように--scopesフラグを使用することができます

gcloud compute instances describe INSTANCE_NAME \ 
    --zone=INSTANCE_ZON --format="yaml(serviceAccounts)" 

を実行することができます。

developer consoleを使用してGCEインスタンスを作成する場合は、「サービスアカウント」セクションの「すべてのクラウドAPIへのフルアクセスを許可する」を必ず選択してください。

関連する問題