-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Composer support: private packages #2354
Comments
Currently, Renovate will set a token in a temporary The next steps are:
@swissspidy where/when is the custom registry URL defined in your project? e.g. is it committed as part of |
Yes, the custom registry is set in the Here's a simplified example:
{
"name": "acme/my-awesome-site",
"description": "My WordPress site",
"license": "GPL-2.0-or-later",
"config": {
"vendor-dir": "wordpress/vendor",
"sort-packages": true
},
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org"
},
{
"type": "composer",
"url": "https://composer.acme.com"
},
{
"type": "git",
"url": "git@github.com:acme/some-private-repository.git"
}
],
"require": {
"php": ">=7.2",
"acme/some-private-repository": "dev-master",
"acme/foo-package": "^1.0",
"acme/bar-package": "^1.0"
},
"minimum-stability": "dev",
"prefer-stable": true
} Explanation:
{
"http-basic": {
"composer.acme.com": {
"username": "johndoe",
"password": "..."
}
},
"github-oauth": {
"github.com": "...."
},
"bitbucket-oauth": {
"bitbucket.org": {
}
}
} While some Composer repositories (like Packagist) just point to GitHub repositories, some use projects like Satis or Release Belt where simple ZIP files can be exposed as Composer packages. |
Its been a couple of months on this issue, I've now hit this issue with my own private satis repository. I need to specify HTTP basic auth credentials for mine, does Renovate Docker take in an |
Can you specify exactly what the scenario is? Eg self hosted, GitLab, and what type of private composer host? |
I have a Satis repository for private composer packages which uses HTTP Basic Authentication. Composer would normally popup and ask for credentials but obviously instead I get an error because we are I'm using the Docker repo and GitLab CI for this. So I just need some way I can pass in the authentication credentials OR alternatively provide the |
There will be two parts to this:
In fact I think there's one step missing at the start:
For (0), are you looking up all packages from Satis, or just some? How is it specified in For (1), the credentials would need to be configured into hostRules and then the packagist datasource code extended to look up hostRules and use any auth found. For (2), we already write |
For 0, I only have 1 package which is from my private repo, the rest are from packagist. I specify the repository in my project's
My repo above requires HTTP Basic Auth which what I need to give to Renovate. I think Yes you can add |
In that case:
|
@rarkins I don't think I'd like to commit secrets though, is there a way to specify |
@Jamesking56 you can supply For the hosted app, users would encrypt the field with Renovate's public key so that it's unreadable to anyone but the bot. |
🎉 This issue has been resolved in version 13.101.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thanks for this @rarkins , what is the documentation on how to configure the credentials for the Docker app? Is it specifying |
I forgot to add that to docs and will do. Configure it like: hostRules: [{ |
Adds support for custom Packagist registries. - [x] Support dynamic packages.json interface for wpackagist.org - [x] Support static packages.json for satis - [x] Support basic auth using hostRules - [x] Write basic auth to `auth.json` Closes renovatebot#2574, Closes renovatebot#2354
@marijoo Please open a new issue in config-help repo for support and don't pollute old closed issues. |
What would you like Renovate to be able to do?
Since Composer support is underway (see #1357), it would be great if it would also support private package repositories, e.g. packages that aren't on Packagist or public GitHub repositories. Without that, Renovate Bot won't be able to update all PHP dependencies when Composer can't access these packages.
I first raised this at renovatebot/config-help#73 (comment)
Describe the solution you'd like
Private repositories are usually protected using HTTP authentication, for which the credentials can be stored in
~/.composer/auth.json
(see https://getcomposer.org/doc/articles/http-basic-authentication.md).According to #1357 (comment) Renovate already creates a
auth.json
file for Composer.What is now needed is a way to pass credentials for a private composer repository to Renovate that it then can add to
auth.json
.The text was updated successfully, but these errors were encountered: