GitPHP / Docs / ⭐️ Token Push
⚡️ REST API v1

The GitPHP guide 🚀

Comprehensive open-source documentation: Self-hosting, Personal Access Tokens, Git & SSH, pull requests, and REST API.

⭐️ Personal Access Token Push (PAT)

Recommended for Security & CI/CD

Personal Access Tokens (PAT) let you authenticate and push to your repositories securely without exposing or entering your primary account password. Tokens are generated as gtp_… strings and stored safely hashed (SHA-256) in the database.

1. Generate Token

Under Settings → Access Tokens (or direct URL /settings/tokens), choose a name, select write scope, and copy your token.

2. Use with Git

Paste the token in place of your password whenever running git push or git clone.

3. Instant Revocation

If a token is leaked or no longer needed, revoke it in one click without altering your account credentials.

Practical Usage Examples:

1. Cache locally via Git Credential Store:

# Enable local credential caching
git config --global credential.helper store

# Push and input credentials once
git push https://git.ysnapp.com/aburasha/my-project.git main
# Username: aburasha
# Password: gtp_your_token_here

2. Direct Remote URL with Token:

git remote set-url origin https://aburasha:[email protected]/aburasha/my-project.git
git push origin main

3. Continuous Integration (CI/CD) — GitHub Actions & GitLab CI:

# In GitHub Actions:
- name: Push to GitPHP
  env:
    GIT_TOKEN: ${{ secrets.GITPHP_TOKEN }}
  run: |
    git remote set-url origin https://aburasha:${GIT_TOKEN}@git.ysnapp.com/aburasha/my-project.git
    git push origin main
💡 Token Scopes: The write scope allows pushing, cloning, and full API access, while the read scope is restricted to cloning and reading API data only.
⚠️ Official Notice: Feature Deprecated Temporary push signatures (gitsig_*) are deprecated and no longer recommended for new workflows. Please migrate to official supported methods:
  • Interactive Push / CLI: Use standard Personal Access Tokens (PAT) (pat_*) or SSH Keys.
  • CI/CD & Headless Updaters: Use the modern Remote Updates Architecture (upd_*) via /settings/updates.

Signed Push Signatures [Deprecated]

Deprecated Feature

This legacy capability generated temporary capability tokens formatted as gitsig_…. Please refrain from configuring new automation with this method and switch to the supported upd_* or PAT mechanisms.

Single-Use Burn Mode

Legacy single-use token burn upon completion.

Expiration Scope

Short-lived duration enforcement.

Repository & IP Scoping

Strict network binding.