GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Google Cloud Functions - Private Github repo in package.json · Issue #300 · GoogleCloudPlatform/nodejs-docs-samples

Google Cloud Functions - Private Github repo in package.json #300

New issue
Copy link
New issue
Copy link
Closed
Closed
Google Cloud Functions - Private Github repo in package.json#300
Copy link
Labels
🚨This issue needs some love.triage meI really want to be triaged.

Description

@mderazon
mderazon
opened on Jan 16, 2017
Issue body actions

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

"dependencies": {
    "some-package": "git+ssh://[email protected]: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.

Reacted by Alex Zaslavsky, Nick Faughey, Justin, Michael DeRazon, Don McCurdy, AB, pinage404, Murray Rowan, Arlair, Bryan Massoth and 14 more

Activity

  1. avinassh commented on Apr 19, 2017

    @avinassh
    avinassh
    on Apr 19, 2017
    More actions

    Any update on this? What would be the preferred way to access private repository dependencies?

  2. mderazon commented on Apr 19, 2017

    @mderazon
    mderazon
    on Apr 19, 2017
    Author
    More actions

    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.

    Reacted by Jason Dobry, Kirill Groshkov, Murray Rowan and Alex Tran
  3. jmdobry
    closed this as completedon Aug 21, 2017
  4. kirillgroshkov commented on Sep 7, 2017

    @kirillgroshkov
    kirillgroshkov
    on Sep 7, 2017
    More actions

    Also have this issue.

  5. erichiggins commented on Feb 1, 2018

    @erichiggins
    erichiggins
    on Feb 1, 2018
    More actions

    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!

    Reacted by Enrique Enciso and Akshay Rangnekar
  6. Yuripetusko commented on Aug 27, 2018

    @Yuripetusko
    Yuripetusko
    on Aug 27, 2018
    More actions

    Is this still not possible with firebase functions? I tried and I think it is failing

  7. hadiosbourne commented on Sep 6, 2018

    @hadiosbourne
    hadiosbourne
    on Sep 6, 2018
    More actions

    got the same question ^^

  8. jk89 commented on Oct 1, 2018

    @jk89
    jk89
    on Oct 1, 2018
    More actions

    Same ^^ it does not seem to work in typescript if you have typescript dependancies which are of the form git+https://.... I couldn't get pack working as it dosent seem to working with nested packed tgz dependancies.

  9. avinassh commented on Oct 5, 2018

    @avinassh
    avinassh
    on Oct 5, 2018
    More actions

    Here is a solution what we use at my workplace. We use Google Cloud Builder to build the docker images and install the node packages over (git+ssh). However, accessing private Github repos in cloud builder is also an issue, cos your Github token might get leaked. So we wrote a tool for that.

    link to tool: fidelius
    a brief intro: link

  10. yoshi-automation
    added
    triage meI really want to be triaged.
    🚨This issue needs some love.
    on Apr 6, 2020
  11. andrew-property-xyz commented on Jun 9, 2020

    @andrew-property-xyz
    andrew-property-xyz
    on Jun 9, 2020
    More actions

    Apologies, I know this issue is closed but I've not found anything else on the Internet that comes as close as this issue in relation to the fundamental issue I'm having, viz gcloud functions deploy simply won't work with modules from private repos (GitHub Packages in my case).

    In my cloudbuild.yaml, I can use the bash entry point of gcloud builder to echo the necessary registry path and auth token to /builder/home/.npmrc and this allows the node builder to quite happily run install, test, etc. (bringing in the private module). However, as soon as gcloud functions deploy executes, the node_modules folder is zapped and (according to the docs) npm install --production is executed but although npm HOME does appear to be /builder/home (assuming this is the case because that's where the npm log gets written when the step fails), the .npmrc file I put there in the earlier step is completely ignored.

    So, what gives? Either
    a) gcloud functions deploy is running npm in an isolated/protected context so it has no access to /builder/home, or
    b) it is running with it's own user config which overrides /builder/home/.npmrc, or
    c) the /builder/home/.npmrc is explicitly removed (if so, why?), or
    d) the entire environment is reset somehow, thereby getting rid of the .npmrc I created, or
    e) something else...

    Unfortunately, I've found no clues as to what exactly gcloud functions deploy does and it seems I cannot deploy a GCF any other way (so, no, it does not work from command line either).

    In the meantime, I'm using the workaround (which does work, thank you), but surely it cannot be that difficult to somehow get the npm that is executed by gcloud functions deploy to honour an npm user config file (either in /builder/home/.npmrc or explicitly specified using --userconfig or the NPM_CONFIG_USERCONFIG environment variable).

    Reacted by Peter W
  12. grayside
    added a commit that references this issue on Oct 26, 2022

    feat: introduces HTTP targets to default v2 API (#300)

    faaf165
  13. grayside
    added a commit that references this issue on Nov 3, 2022

    feat: introduces HTTP targets to default v2 API (#300)

    971ef2f
  14. NimJay
    added 2 commits that reference this issue on Nov 9, 2022

    chore: new owl bot post processor docker image (#300)

    3b2c642

    feat!: drop node8 support, support for async iterators (#300)

    63dfc1f
  15. ace-n
    added a commit that references this issue on Nov 11, 2022

    feat!: drop node8 support, support for async iterators (#300)

    5493b9d
  16. telpirion
    added a commit that references this issue on Nov 16, 2022

    docs: improve detect.js samples (#300)

    8b4218c
  17. ahrarmonsur
    added 2 commits that reference this issue on Nov 18, 2022

    Release v0.8.2 (#300)

    6bcbec1

    Release v0.8.2 (#300)

    39ab9cd
  18. kweinmeister
    added a commit that references this issue on Nov 18, 2022

    chore: release 2.0.2 (#300)

    d2bcbb2
  19. NimJay
    added a commit that references this issue on Nov 18, 2022

    Release v0.8.2 (#300)

    1583e1e
  20. Shabirmean
    added a commit that references this issue on Feb 16, 2023

    chore: release 1.2.0 (#300)

    8e0641d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🚨This issue needs some love.triage meI really want to be triaged.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.