René's URL Explorer Experiment


Title: Git auto-init: optional `X-Git-Remote` header to configure origin on the new repo · Issue #476 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub

Open Graph Title: Git auto-init: optional `X-Git-Remote` header to configure origin on the new repo · Issue #476 · JavaScriptSolidServer/JavaScriptSolidServer

X Title: Git auto-init: optional `X-Git-Remote` header to configure origin on the new repo · Issue #476 · JavaScriptSolidServer/JavaScriptSolidServer

Description: Context When JSS auto-inits a repo on first git-receive-pack push (#466/#469), the resulting .git/config has no remotes configured. That's correct for the create-on-push semantics — JSS doesn't know where the client cloned from. In pract...

Open Graph Description: Context When JSS auto-inits a repo on first git-receive-pack push (#466/#469), the resulting .git/config has no remotes configured. That's correct for the create-on-push semantics — JSS doesn't kno...

X Description: Context When JSS auto-inits a repo on first git-receive-pack push (#466/#469), the resulting .git/config has no remotes configured. That's correct for the create-on-push semantics — JSS doesn&#...

Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/476

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Git auto-init: optional `X-Git-Remote` header to configure origin on the new repo","articleBody":"## Context\n\nWhen JSS auto-inits a repo on first `git-receive-pack` push (#466/#469), the resulting `.git/config` has no remotes configured. That's correct for the create-on-push semantics — JSS doesn't know where the client cloned from.\n\nIn practice this bites pod operators who later `cd` into the pod-side install dir and want to track upstream:\n\n```bash\n$ cd pod-data/public/apps/chrome\n$ git pull\nfatal: no upstream branch configured\n$ git pull origin\nfatal: 'origin' does not appear to be a git repository\n```\n\nThe user has to manually `git remote add origin \u003cupstream>` and `git branch --set-upstream-to` for every installed app.\n\n## Proposal\n\nWhen a push triggers auto-init, optionally read an `X-Git-Remote` HTTP header from the client. If present, validated, and not already configured on the (just-auto-init'd) repo, run the equivalent of:\n\n```bash\ngit -C \u003crepoAbs> remote add origin \u003cvalue>\ngit -C \u003crepoAbs> branch --set-upstream-to=origin/main main   # if HEAD is main\n```\n\nso the operator can `git pull` later without ceremony.\n\n## Surface\n\n```\nPOST /public/apps/foo/git-receive-pack HTTP/1.1\nAuthorization: Bearer \u003ctoken>\nContent-Type: application/x-git-receive-pack-request\nX-Git-Remote: https://github.com/solid-apps/foo\n...\n```\n\n## Constraints\n\n- **Only on auto-init path.** Don't touch `.git/config` of a pre-existing repo — that's the operator's territory, surprise-edits there are unacceptable.\n- **Validate the value.** URL must match `^https?://[A-Za-z0-9._/:-]+$`. Reject `git@`, `ssh://`, `file://`, anything with shell metacharacters, anything with `..`. This is the same sort of guard `tryAutoInitRepo` already needs against symlink shenanigans (called out in its docstring).\n- **No-op if not present.** Header is purely opt-in; existing clients keep working.\n- **Run after `git init`, before the push proceeds.** Otherwise the push could race with the config write.\n- **Use `git remote add` and `git branch --set-upstream-to` via `spawnSync`** — don't hand-roll the config file. `git` writes the right shape.\n\n## Scope\n\n~25 LoC + a test in `test/git-auto-init.test.js`:\n\n```js\nit('configures origin from X-Git-Remote when present on first push', async () => {\n  const url = `${baseUrl}/public/apps/penny/info/refs?service=git-receive-pack`;\n  const res = await fetch(url, {\n    headers: { 'X-Git-Remote': 'https://github.com/solid-apps/penny' }\n  });\n  assert.strictEqual(res.status, 200);\n  const configPath = path.resolve(DATA_DIR, 'public/apps/penny/.git/config');\n  const cfg = readFileSync(configPath, 'utf8');\n  assert.ok(cfg.includes('[remote \"origin\"]'), 'origin should be configured');\n  assert.ok(cfg.includes('url = https://github.com/solid-apps/penny'));\n});\n```\n\nPlus a negative test: malformed URL → header silently ignored, push still succeeds.\n\n## Why this is JSS-level (not jspod-level)\n\n- Only JSS knows when auto-init fires (the trigger that \"the repo is new and we can safely write config\")\n- Works for any client (jspod install, raw `git push`, future tools), not just the wrapper\n- Operators who deploy JSS directly benefit too\n\n## Cross-references\n\n- Client side: jspod will add the header in `jspod install` once this lands. Tracked separately as a jspod follow-up.\n- #471 (auto-init default branch) — same surface area; this proposal also benefits from the deterministic `main` default for the `branch --set-upstream-to` step.","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-05-17T12:39:38Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/476"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:2f16de6b-6bef-c33f-2651-a3ea477cabe4
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8EAA:1F98:6C0D7:8BA94:6B03A2B6
html-safe-nonce83a50e0e37baa3ce8e9eabdcbba73a3f8b29412b2d4aed0bb831328e95910c6d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RUFBOjFGOTg6NkMwRDc6OEJBOTQ6NkIwM0EyQjYiLCJ2aXNpdG9yX2lkIjoiNzA2NjEyNTE2OTc3NzE1Njc5MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf680974d3c3dd1f57e6e2591a90e81ba8fec4a4a50d4ce7d1d1755d2845ca9b9
hovercard-subject-tagissue:4463493659
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/476/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9735716e79bf87c9beb7a323795f17689676b656acb7ce3c7cb84f8a72cde9ef/JavaScriptSolidServer/JavaScriptSolidServer/issues/476
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9735716e79bf87c9beb7a323795f17689676b656acb7ce3c7cb84f8a72cde9ef/JavaScriptSolidServer/JavaScriptSolidServer/issues/476
og:image:altContext When JSS auto-inits a repo on first git-receive-pack push (#466/#469), the resulting .git/config has no remotes configured. That's correct for the create-on-push semantics — JSS doesn't kno...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemelvincarvalho
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git
octolytics-dimension-user_id205442424
octolytics-dimension-user_loginJavaScriptSolidServer
octolytics-dimension-repository_id958025407
octolytics-dimension-repository_nwoJavaScriptSolidServer/JavaScriptSolidServer
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id958025407
octolytics-dimension-repository_network_root_nwoJavaScriptSolidServer/JavaScriptSolidServer
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/476#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJavaScriptSolidServer%2FJavaScriptSolidServer%2Fissues%2F476
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJavaScriptSolidServer%2FJavaScriptSolidServer%2Fissues%2F476
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=JavaScriptSolidServer%2FJavaScriptSolidServer
Reloadhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/476
Reloadhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/476
Reloadhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/476
JavaScriptSolidServerhttps://github.com/JavaScriptSolidServer
JavaScriptSolidServerhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer
Codehttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer
Issues165 (165)https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues
Pull requests14 (14)https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pulls
Actionshttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/actions
Projectshttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/projects
Security and qualityhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/security
Insightshttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/insights
https://github.com/JavaScriptSolidServer/JavaScriptSolidServer
New issuehttps://github.com/login?return_to=https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/476
New issuehttps://github.com/login?return_to=https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/476
Git auto-init: optional X-Git-Remote header to configure origin on the new repohttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/476#top
pluginCould be implemented as a plugin (#206); core/plugin line defined in #564https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues?q=state%3Aopen%20label%3A%22plugin%22
https://github.com/melvincarvalho
melvincarvalhohttps://github.com/melvincarvalho
on May 17, 2026https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/476#issue-4463493659
#466https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/466
#469https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/469
Git auto-init: pin the default branch name (git init -b main) so updateInstead reliably extracts working tree #471https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/471
melvincarvalhohttps://github.com/melvincarvalho
pluginCould be implemented as a plugin (#206); core/plugin line defined in #564https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues?q=state%3Aopen%20label%3A%22plugin%22
on Jun 11, 2026https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/476#event-26649429887
Sign up for freehttps://github.com/signup?return_to=https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/476
Sign in to commenthttps://github.com/login?return_to=https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/476
pluginCould be implemented as a plugin (#206); core/plugin line defined in #564https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues?q=state%3Aopen%20label%3A%22plugin%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.