You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are also SSH input available: `ssh_key`, `ssh_key_pub` and `ssh_domain` that are used for depending on private repositories. See below for more information on usage.
@@ -94,8 +94,10 @@ This action runs on a custom base image, available at https://github.com/php-act
94
94
95
95
Use the following inputs to run a specific PHP/Composer version combination:
To install from a private repository, SSH authentication must be used. Generate an SSH key pair for this purpose and add it to your private repository's configuration, preferable with only read-only privileges. On Github for instance, this can be done by using [deploy keys][deploy-keys].
172
174
173
-
Add the key pair to your project using [Github Secrets][secrets], and pass them into the `php-actions/composer` action by using the `ssh_key` and `ssh_key_pub` inputs. If your private repository is stored on another server than github.com, you also need to pass the domain via `ssh_domain`.
175
+
Add the key pair to your project using [Github Secrets][secrets], and pass them into the `php-actions/composer` action by using the `ssh_key` and `ssh_key_pub` inputs. If your private repository is stored on another server than github.com, you also need to pass the domain via `ssh_domain`. If the private repository is configured to use a non-standard SSH port, you can configure this by passing `ssh_port`.
174
176
175
177
Example yaml, showing how to pass secrets:
176
178
@@ -195,38 +197,23 @@ It's recommended to use SSH keys for authentication, but sometimes HTTP basic au
195
197
196
198
1) Create a [personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) for the Github account you wish to authenticate with.
197
199
198
-
2) Add the following JSON to a new Github Secret called `COMPOSER_AUTH_JSON`:
199
-
200
-
```json
201
-
{
202
-
"http-basic": {
203
-
"github.com": {
204
-
"username": "<YOUR_GITHUB_USERNAME>",
205
-
"password": "<YOUR_PERSONAL_ACCESS_TOKEN>"
206
-
}
207
-
}
208
-
}
209
-
```
200
+
2) Create a new GitHub Secret called `PAT` with a value of personal access token.
210
201
211
-
3) Pass this secret to auth.json as a separate action step within your Yaml config, and remove auth.json to prevent deploying it:
4) Now, any connections Composer makes to Github.com will use your HTTP basic auth credentials, which is essentially the same as being logged in as you, so your private repositories will now be available to Composer.
216
+
4) Now, any connections Composer makes to GitHub.com will use your HTTP basic auth credentials, which is essentially the same as being logged in as you, so your private repositories will now be available to Composer.
0 commit comments