From d6ad4d89f93e39025d5eaec817f9420c8217cc46 Mon Sep 17 00:00:00 2001 From: User Date: Tue, 14 Oct 2025 22:43:04 -0400 Subject: [PATCH] Implement authentication for push and sync MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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!