question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Google Cloud Functions - Private Github repo in package.json

See original GitHub issue

Does GCF support private repo as a dependency in package.json ?

"dependencies": {
    "some-package": "git+ssh://git@github.com:myorg/myproject"
}

?

Today I am making sure the machine I run this from has ssh access to our organization GH account, but I am wondering how to achieve that via GCF.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:24
  • Comments:9

github_iconTop GitHub Comments

4reactions
mderazoncommented, Apr 19, 2017

Response from Google in the cloud functions beta testers forum:

Installing npm modules from a private registry is indeed not supported in Cloud Functions at the moment. They are treated as public modules, and this is why you get the error. The workarounds described in stackoverflow, including yours, are probably your best bet at the moment. But thanks for reporting - we will consider adding the right support for private modules in the near future so that they could work if you specify the .npmrc file.

2reactions
erichigginscommented, Feb 1, 2018

I was having this issue yesterday and found a reasonable workaround based in the linked StackOverflow answer. Hope it helps others that might be running into this!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Specifying dependencies in Node.js - Cloud Functions
You can use a private npm module by providing settings for authenticating with the registry in a .npmrc file in the function's directory....
Read more >
Installing private GitHub npm package in Google Cloud ...
An approach that would allow you to install packages from private GitHub repos, although with a security risk, is to have your app's...
Read more >
Host Private Node.JS Packages on the Google Cloud - Medium
Not all code though is meant for public distribution, though. Using private Git repositories as package sources was a very common solution for ......
Read more >
Handling dependencies | Cloud Functions for Firebase - Google
To specify a dependency for your function, add it to your package.json file. ... Do not include the .npmrc file if you're not...
Read more >
Google Cloud Functions Tutorial - DevOps by Example
Run gcloud functions deploy. Specify the source that will point to the git repository. For the first time, you also need to specify...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found