简体   繁体   English

“ git push appengine master”中需要用户名和密码

[英]Username and pass required in “git push appengine master”

This is my first time using Google App Engine. 这是我第一次使用Google App Engine。 I am trying to upload a PHP website. 我正在尝试上传一个PHP网站。 I am trying to upload it using git. 我正在尝试使用git上传它。 I have followed their tutorial. 我遵循了他们的教程。 At the end they said to type this code in so i did. 最后,他们说我要输入此代码。 I have tried to type this code in git bash. 我试图在git bash中键入此代码。

Here is the code - git push appengine master . 这是代码git push appengine master It then asks me about a username and password. 然后询问我有关用户名和密码的信息。 Nowhere in the tutorial said anything about any username or password. 本教程中的任何地方都未提及任何用户名或密码。 I have tried to give it my Google email-id and password but it said authentication failed. 我试图给它提供我的Google电子邮件ID和密码,但是它说验证失败。 I don't know what to do now. 我现在不知道该怎么办。

You can generate your password for deployment in Cloud Console . 您可以生成密码以在Cloud Console中进行部署。

Go to cloud.google.com/console , select your project, and on the left menu list, expand Cloud Development , and click on Push-to-deploy . 转到cloud.google.com/console ,选择您的项目,然后在左侧菜单列表中,展开Cloud Development ,然后单击Push-to-deploy

An alternate way to get there is from the App Engine console , under Admininstration , in Application Settings , in the Source Push-to-Deploy section, by following the link that says click here . 另一种实现此目标的方法是从App Engine控制台的管理 下的“ 应用程序设置”中的“ 源推送到部署”部分中,方法是单击单击此处的链接。

I assume you already know this since you have successfully set up the repo. 我假设您已经成功设置了存储库,所以您已经知道这一点。

Now, once you're in Push-to-deploy settings, you'll see a Get password and a Delete repository button at the top. 现在,进入“推送部署”设置后,您将在顶部看到“ 获取密码”和“ 删除存储库”按钮。 Obviously, you need the former. 显然,您需要前者。

在此处输入图片说明

You'll have to go through Google's OAuth authentication, select the account that is a developer account in your application, and click Accept to grant read-write access to Google Code . 您必须通过Google的OAuth身份验证,在您的应用程序中选择作为开发人员帐户的帐户,然后点击接受以授予对Google Code的读写权限。

Once you grant access, you'll see a page saying: 授予访问权限后,您会看到一个页面,上面显示:

This is your git password: 这是您的git密码:

...

To use this password, please add the following text to your .netrc file: 要使用此密码,请在.netrc文件中添加以下文本:

machine code.google.com login you@gmail.com password yourpassword

Learn more about using Git and Push-to-Deploy. 了解有关使用Git和即按即用的更多信息。

You'll need to copy-paste code in your .netrc file, which should in your home directory. 您需要在.netrc文件中复制粘贴代码,该文件应该位于主目录中。 If it does not exist, just create it. 如果它不存在,则只需创建它。

On Windows: 在Windows上:

As eddard.stark mentioned in his comment, on windows, the .netrc file has to be named _netrc instead . 正如eddard.stark在他的评论中提到的那样, 在Windows上, .netrc文件必须命名为_netrc

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM