2

This is my first time using Google App Engine. I am trying to upload a PHP website. I am trying to upload it using 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.

Here is the code - 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. I don't know what to do now.

halfer
  • 19,824
  • 17
  • 99
  • 186
odbhut.shei.chhele
  • 5,834
  • 16
  • 69
  • 109

1 Answers1

4

You can generate your password for deployment in 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.

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.

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.

enter image description here

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.

Once you grant access, you'll see a page saying:

This is your git password:

To use this password, please add the following text to your .netrc file:

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

Learn more about using Git and Push-to-Deploy.

You'll need to copy-paste code in your .netrc file, which should in your home directory. If it does not exist, just create it.

On Windows:

As eddard.stark mentioned in his comment, on windows, the .netrc file has to be named _netrc instead.

Community
  • 1
  • 1
Attila O.
  • 15,659
  • 11
  • 54
  • 84
  • thank you very much for your help. but the problem is i have done all these. I am in the last part. i have done this part saying "If your development code is not yet a local Git repository, make it one, and link it to the URL of the new Google repository with the following commands:". but when i try to do the next bit saying "git push appengine master". what is my username? – odbhut.shei.chhele Dec 06 '13 at 07:08
  • what is my username? where can i find it? git is asking me for my username of https://code.google.com – odbhut.shei.chhele Dec 06 '13 at 07:12
  • i think git cannot find my .netrc file. but i have set my HOME variable. and the is a .netrc file containing a single line that is "machine code.google.com login my_email@gmail.com password mypassword" – odbhut.shei.chhele Dec 06 '13 at 07:18
  • 1
    thank you for all your help. I have solved it. In windows you have to save the .netrc file as _netrc – odbhut.shei.chhele Dec 06 '13 at 07:23
  • @eddard.stark thanks for sharing that! I've updated my answer so that people searching for this can find the solution easily. Frankly, I didn't even know you were on windows. – Attila O. Dec 06 '13 at 13:50
  • The "cloud development / push to deploy" link is not / no longer present on my cloud console. All I can find now about push-to-deploy uses jenkins / maven / gradle, which I should probably learn some day when I have the time. – rakensi Jun 06 '15 at 09:50