Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top