Sites source repository write credential is already expired when issued
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What issue are you seeing?
A Sites project cannot be published because create_source_repository_write_credential returns a source write credential whose token_expires_at is already in the past when it is issued. Git push then fails with: 403 Invalid or expired token.
What steps can reproduce the bug?
- Use an existing active public Sites project as the owner.
- Call create_source_repository_write_credential for the project.
- Observe that token_expires_at is earlier than the local current time at issuance.
- Push the current HEAD to the returned remote using the documented HTTP extra-header authentication mode.
- The server rejects the push with HTTP 403 and "Invalid or expired token".
I also re-authenticated in the ChatGPT desktop app and obtained a new credential. The replacement credential had the same already-expired timestamp behavior.
What is the expected behavior?
The returned short-lived credential should be valid at the time of issuance and allow the owner to push the current source branch so a Site version can be saved and deployed.
Additional information
No source code, site URL, project ID, user data, photos, logs, or credentials are included in this report. Local system time was checked and was correct.
Contributor guide
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 at the create_source_repository_write_credential entry point and reproduce the report with an active public Sites project, comparing token_expires_at with the local current time. Then attempt the documented HTTP extra-header Git push; done means a newly issued credential is valid at issuance and the current source branch push succeeds instead of returning HTTP 403.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git
- Domain
- api, authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100