kubeless icon indicating copy to clipboard operation
kubeless copied to clipboard

Allow dependencies from a Private go module

Open TimelyToga opened this issue 3 years ago • 0 comments

Is this a BUG REPORT or FEATURE REQUEST?: Feature Request :)

What happened: Unable to use a private go module for a golang kubeless function

What you expected to happen: Able to supply credentials or an ssh key for fetching private go modules when building.

How to reproduce it (as minimally and precisely as possible):

  • We need to set the GOPRIVATE env var in the compile container (this is possible today AFAIK)
  • Be able to retrieve credentials when compiling
  • configure git to use these credentials in compile-function.sh:
    • HTTP:
      • git config --global url."https://${username}:${access_token}@github.com".insteadOf "https://github.com"
      • git config --global url."https://${bitbucket_user_id}:${bitbucket_access_token}@privatebitbucket.com".insteadOf "https://privateaccount.com"
    • SSH:
      • git config --global url."ssh://[email protected]/".insteadOf "https://github.com/"
      • git config --global --replace-all url."[email protected]:".insteadOf "https://privataccount.com"

Then when the go get commands are called when pulling the dependencies, the private repos should be registered correctly.

I can take a stab at a super dumb version of this, but the the runtime build is failing at present.

Related Issues

#1075

TimelyToga avatar Nov 10 '20 21:11 TimelyToga