Jump to content

Possible to install module from private repository URL?


Robin S
 Share

Recommended Posts

Does anyone know if there is a way to install a module via the "Add Module From URL" feature if the module is in a private repository? It's a GitLab repository in this case.

When I try to do this it fails with:

Quote

File could not be downloaded... file_get_contents(...): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found (tried: fopen)

The URL is correct, but no doubt needs authentication to be accessed. Is there a way to supply username/password to allow the download? 

  • Like 1
Link to comment
Share on other sites

Since GitLab doesn't support simple basic auth, you're out of luck with "username:password@" in front of the url. But you can set the "private_token" parameter like this: https://mygitlabserver.com/myrepo/repository/master/archive.zip?private_token=2CEgvKCfrABgshElokZ3

The private token can be generated within the GitLab personal user settings. This should get you going: https://mygitlabserver.com/profile/personal_access_tokens - replace "mygitlabserver.com" with the url of your GitLab server.

  • Like 7
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...