Skip to content
Closed
Show file tree
Hide file tree
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
12 changes: 12 additions & 0 deletions packages/docs/docs/usage/github-action.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,18 @@ Configure Git with appropriate user information for commits made by MyCoder:

This clearly identifies commits made automatically by MyCoder.

### SSH Authentication

When using GitHub Actions with SSH authentication:

1. **Avoid SSH Keys with Passphrases**: For automated environments like GitHub Actions, use SSH keys without passphrases or use alternative authentication methods.

2. **Use HTTPS with PAT**: Consider using HTTPS authentication with a Personal Access Token (PAT) for GitHub Actions to avoid SSH passphrase prompts.

3. **If SSH is Required**: If you must use SSH authentication in GitHub Actions, ensure your workflow doesn't require interactive passphrase entry by:
- Using SSH keys without passphrases for automation purposes only
- Configuring the SSH agent properly in your workflow

## Usage Examples

### Trigger MyCoder on an Issue
Expand Down
32 changes: 32 additions & 0 deletions packages/docs/docs/usage/github-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,38 @@ If your team uses a complex GitHub workflow (e.g., with code owners, required re
- **Authentication Problems**: Ensure you've run `gh auth login` successfully
- **Permission Issues**: Verify you have write access to the repository
- **Branch Protection**: Some repositories have branch protection rules that may prevent direct pushes
- **SSH Passphrase Prompts**: If you use SSH keys with passphrases, automated workflows may be interrupted by passphrase prompts

### SSH Passphrase Best Practices

When using GitHub mode with SSH authentication, it's important to properly manage SSH key passphrases to ensure automation works smoothly:

1. **Use SSH Agent**: Configure ssh-agent to remember your passphrase, so you don't need to enter it repeatedly:

```bash
# Start the ssh-agent in the background
eval "$(ssh-agent -s)"

# Add your SSH private key to the ssh-agent
ssh-add ~/.ssh/id_ed25519 # Replace with your key path
```

2. **Configure SSH Agent to Persist**:
- On macOS, you can use the keychain to remember your passphrase:
```bash
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
```
- On other systems, consider using tools like `keychain` or configuring your desktop environment to start ssh-agent automatically

3. **Create Config File** (optional): Create or edit `~/.ssh/config` to use the ssh-agent:
```
Host github.com
AddKeysToAgent yes
UseKeychain yes # macOS only
IdentityFile ~/.ssh/id_ed25519
```

Without proper SSH agent configuration, MyCoder may be interrupted by passphrase prompts during Git operations, which can cause timeouts in automated environments.

If you encounter any issues with GitHub mode, you can check the GitHub CLI status with:

Expand Down
Loading