Support HTTPS + token pushes (CI-friendly; prerequisite for scheduled runs)
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 1
- Forks
- 5
- Avg merge
- 8d 1h
- Merged PRs (30d)
- 4
Description
Problem
puppetsync pushes over SSH: git_push_to_remote runs git push <remote> against the fork's ssh_url (set up by ensure_git_remote from user_repo_fork.ssh_url), which requires a working ssh-agent. That's fine interactively, but it's the last blocker for running puppetsync unattended (#56): CI runners and scheduled jobs have a GITHUB_API_TOKEN, not an SSH identity.
This has been a stretch-goal TODO in plans/init.pp for years:
# - [ ] push changes using HTTPS basic auth + GitHub token (CI friendly)
Proposed design
-
ensure_git_remotegains a transport choice: whengit.push_transport: https(session config; default remainsssh), use the fork'sclone_url(https://github.com/<user>/<repo>.git) as the remote URL. -
The push itself authenticates with the existing
GITHUB_API_TOKENwithout writing the token to disk or the remote URL — e.g.:git -c credential.helper='!f() { echo username=x-access-token; echo password=$GITHUB_API_TOKEN; }; f' push ...(env-var indirection keeps the token out of process listings and
.git/config). -
Nothing else changes: fork creation, PR creation, and the approve/merge plans already use the API token.
Notes
- The token needs
reposcope (it already does, for fork/PR creation) — in GHA, a fine-grained PAT or GitHub App token for the bot account, since the defaultGITHUB_TOKENcan't push to a fork owned by another account. - Verification can follow the established pattern: unit-spec the remote-URL/credential-helper construction, and e2e against a local
file://"fork" remote to prove the push path without touching GitHub. - With this, #49 (idempotency), #53 (fast re-clones), and #55 (dynamic inventory) merged, #56 (scheduled org-wide runs) has no remaining technical prerequisites.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the stretch-goal TODO in plans/init.pp and tracing ensure_git_remote and git_push_to_remote. Unit-spec the remote URL and credential-helper construction, then run the e2e path against a local file:// fork remote. Done means HTTPS token pushes work without storing the token while SSH remains the default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, github, ruby
- Domain
- ci-cd, devops, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100