Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for credentials for private git repo dependencies #735

Closed
allen-servedio opened this issue Feb 13, 2018 · 3 comments
Closed

Comments

@allen-servedio
Copy link
Contributor

Dependencies allows you to define a location and version of the artifact that you want to use. Here is an example:

project:
  name: MyProject
  version: 0.0.1
  packages:
    mypackage:
      license: Apache-2.0
      version: 0.0.1
      dependencies:
        mydep:
          location: https://github.com/my-org/my-private-repo
          version: 0.0.1

However, there does not appear to be a way to define credentials for accessing this repository - which is required for private repos.

The error you get when you try to do this is also not great (it is calling: https://github.com/my-org/my-private-repo/zipball/0.0.1):

Error: manifestreader.go [103]: [ERROR_YAML_FILE_FORMAT_ERROR]: File: [manifest.yaml]:
==> manifestreader.go [147]: [ERROR_YAML_FILE_FORMAT_ERROR]: File: [mypackage]:
==> ==> zip: not a valid zip file
==>

What is actually happening is the call results in a 404 from github.

@allen-servedio
Copy link
Contributor Author

At a suggestion from @csantanapr , I tried to add a username + API token to the repo URL. Unfortunately the code to check if it is a github location does not account for this and so you get this error:

Error: manifestreader.go [73]: [ERROR_YAML_FILE_FORMAT_ERROR]: File: [manifest.yaml]:
==> Dependency type is unknown.  wskdeploy only supports /whisk.system bindings or github.com packages.
==>

That, actually, looks easy to fix...

@allen-servedio
Copy link
Contributor Author

Further, this should allow valid urls such as https://username:password@example.com. This includes alternate hosts such as: gitlab.com or github.ibm.com (there certainly could be more).

allen-servedio pushed a commit to allen-servedio/incubator-openwhisk-wskdeploy that referenced this issue Feb 14, 2018
…ub appears in the host name. Will allow many variations of host names as well as username and password.
@allen-servedio
Copy link
Contributor Author

Where can we add the docs for this fix?

allen-servedio pushed a commit to allen-servedio/incubator-openwhisk-wskdeploy that referenced this issue Feb 15, 2018
mrutkows pushed a commit that referenced this issue Feb 15, 2018
#738)

* GH-735 adjusting check for github to mainly make sure that github appears in the host name. Will allow many variations of host names as well as username and password.

* GH-735 Adding comment that private repos are not fully supported.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant