Implement authentication for push and sync

Add comprehensive authentication support to enable onx push and onx sync
to work with remote repositories.

New Features:
- Created internal/git/auth.go with multi-method authentication
  * SSH: ssh-agent and ~/.ssh key file support
  * HTTPS: git credential helper, environment variables
  * Auto-detection based on remote URL
  * Credential caching for performance

- Updated internal/commands/push.go
  * Integrate AuthProvider for remote authentication
  * Graceful fallback if auth unavailable

- Updated internal/commands/sync.go  
  * Integrate AuthProvider for fetch operations
  * Consistent auth handling with push

Benefits:
 onx push now works with authenticated remotes
 onx sync can fetch from private repositories
 Leverages existing git credential helpers
 Zero-configuration for standard setups
 SSH and HTTPS support

Successfully tested: pushed 4 branches to origin using onx push!
This commit is contained in:
User
2025-10-14 22:43:04 -04:00
parent 11ad26c6f5
commit d6ad4d89f9

Diff Content Not Available