Reputation: 579
I'm trying to deploy a node.js program in Google Cloud's App Engine, but am being given the following error:
Step #1: npm ERR! Error while executing:
Step #1: npm ERR! /usr/bin/git ls-remote -h -t https://source.developers.google.com/p/(project)/r/(repository)
Step #1: npm ERR!
Step #1: npm ERR! fatal: remote error:
Step #1: npm ERR!
Step #1: npm ERR!
Step #1: npm ERR! Invalid authentication credentials.
Step #1: npm ERR!
Step #1: npm ERR! Please generate a new identifier:
Step #1: npm ERR! https://source.developers.google.com/auth/start?scopes=https://www.googleapis.com/auth/cloud-platform
Step #1: npm ERR!
Step #1: npm ERR!
Step #1: npm ERR!
Step #1: npm ERR! exited with error code: 128
This is because of a dependency in my project located at https://source.developers.google.com/p/(project)/r/(repository)
. I am able to install this dependency without errors both on my local machine and in the cloud shell with the help of a .netrc file, as described by the page given in the error message, but it seems that I am unable to copy this file in my deployment.
Is there a way to specify what credentials should be used? Note that I am unable to use the user:pass@host
format explained in the npm docs because the username and password Google give me contain @s and \s.
Upvotes: 4
Views: 1151
Reputation: 3082
I managed to get this working using the following recipe:
git+https://
, not just https://
(thanks Lugassy), don't use username or passwordUpvotes: 1