[英]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.