Skip to content

Commit

Permalink
Update composer auth empty password example with roots/trellis#1412
Browse files Browse the repository at this point in the history
  • Loading branch information
tangrufus committed Jul 23, 2022
1 parent 08c8968 commit ee60ee7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions docs/trellis/master/composer-http-basic-authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Many paid WordPress plugins also offer Composer support. Typically, this is acco
]
```

The actual plugin download is protected behind a basic HTTP authentication layer. This allows the plugin developer to restrict access to the plugin via Composer by a username/password combination. The basic authentication credentials are stored in an auth.json file.
The actual plugin download is protected behind a basic HTTP authentication layer. This allows the plugin developer to restrict access to the plugin via Composer by a username/password combination. The basic authentication credentials are stored in an auth.json file.

```yaml
{
Expand Down Expand Up @@ -43,15 +43,15 @@ vault_wordpress_sites:
```

If the private repository doesn't use a password (because the username contains
an API key for example), you'll need to set an empty password like this:
an API key for example), you'll need to omit `password` like this:

```yaml
# group_vars/<env>/vault.yml

vault_wordpress_sites:
example.com:
composer_authentications:
- { hostname: example.com, username: apikey, password: "''" }
- { hostname: example.com, username: apikey }

```

Expand All @@ -61,4 +61,3 @@ This functionality does have a few requirements:

- The passwords should not be stored as plain text, as described in the [Vault](https://docs.roots.io/trellis/master/vault/) documentation
- Currently, only HTTP basic authentication is supported

0 comments on commit ee60ee7

Please sign in to comment.