Skip to content

Update README to include Poetry system Git client configuration workaround #237

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
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
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,25 @@ env:
CARGO_NET_GIT_FETCH_WITH_CLI: true
```

### Poetry's Git Dependencies on GitHub Actions

If you are using Poetry and have private Git dependencies in your `pyproject.toml`, you might encounter an error similar to the following when running your workflow on GitHub:

```
HangupException

The remote server unexpectedly closed the connection.
```

This issue occurs because Poetry's default Git client may not work well with the SSH configuration set up by this action. To resolve this, you need to [enable the system Git client in Poetry](https://python-poetry.org/docs/configuration/#system-git-client) by adding the following step to your workflow:

```yaml
- name: Enable system Git client
run: poetry config system-git-client true
```

This ensures that Poetry uses the system-installed Git client, which is compatible with the SSH agent configuration provided by this action.

### Using Deploy Keys with Swift Package Manager

`xcodebuild` by default uses Xcode's built-in Git tooling. If you want to use GitHub Deploy Keys as supported by this action, however, that version of Git will lack the necessary URL remapping. In this case, pass `-scmProvider system` to the `xcodebuild` command, as mentioned in [Apple's documentation](https://developer.apple.com/documentation/swift_packages/building_swift_packages_or_apps_that_use_them_in_continuous_integration_workflows#3680255).
Expand Down