Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
update doc to mention using ssh key with multiple private repos
  • Loading branch information
dumityty committed Mar 7, 2025
commit 2a916046427e95fd491fbfa997b98a805e2c022a
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ In the example above, the "key" is passed to the Cache action that consists of a
Installing private repositories
-------------------------------

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].
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].

If using multiple private repos, Github does not allow to share deploy keys across repos, so you can use a normal user account that has access to all the private repos and [add the SSH key][add-ssh-key-git] to that user.

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`.

Expand Down Expand Up @@ -238,5 +240,6 @@ If you found this repository helpful, please consider [sponsoring the developer]
[php-actions-phpspec]: https://github.com/marketplace/actions/phpspec-php-actions
[php-actions-behat]: https://github.com/marketplace/actions/behat-php-actions
[deploy-keys]: https://docs.github.com/en/developers/overview/managing-deploy-keys
[add-ssh-key-git]: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account
[secrets]: https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets
[sponsor]: https://github.com/sponsors/g105b