[英]Pushing local Git repository to remote Google Cloud Repository from inside Eclipse?
我正在嘗試首次將Eclipse項目的本地Git存儲庫推送到Google Cloud Repository中。
為此,我選擇了Team
| 從Eclipse Project Explorer中的Eclipse(Mars)項目的上下文菜單中Push Branch 'master'
,然后提供以下信息:
google
https://source.developers.google.com/p/<x>/
: https://source.developers.google.com/p/<x>/
x
https://source.developers.google.com/p/<x>/
其中x
是我的Google Cloud Platform項目的名稱 <y>@gmail.com
表單的Google帳戶名,即有效的電子郵件地址 接下來,我再次出現兩個對話框,再次請求https://source.developers.google.com/p/<x>/
的存儲庫憑據(好像第一個會被拒絕,但是為什么?)和我提供相同的憑據(用戶,密碼)兩次。
此時,我遇到此錯誤消息:
Can´t connect to any URI: https://source.developers.google.com/p/<x>/
(https://source.developers.google.com/p/<x>/ not authorized)
可能有什么不對? 在推送到Google Cloud Repository時,我應該使用另一個憑據而不是(全局)憑據來推送到Google Cloud Repository(從安全角度看似乎是明智的),如果是這樣,我怎么能獲得一個? 總的來說,從Eclipse內部執行這種推送的正確方法是什么,而不是在命令行上 ?
畢竟我最終是從命令行做的:
cd <local-git-repository>
# pwd contains .git; try git status
# gcloud init was already run
git config credential.helper gcloud.sh
git remote add google https://source.developers.google.com/p/<x>/
這包括以下效果:
google: https://source.developers.google.com/p/<x>/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.