Git Sync

Store the credential for a git repository

Changed on

Stores the access token a git repository authenticates with, so it does not have to be written into the repository URL or a workspace variable. The token is write-only: it is served only to a git-sync job that presents its own job token, and a fork of this workspace reads this copy instead of holding one of its own. Requires workspace admin.

post/w/{workspace}/git_sync/credential

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/w/{workspace}/git_sync/credential
  • Auth
    • HTTP bearer
    • or API key in cookie token

Path parameters

workspacestring required

Request body

repo_urlstring required

The repository the credential is for, and the key it is stored under. It is served for this repository and no other, so repointing a resource elsewhere cannot carry the token along.

tokenstring required

The access token, as pasted

Response

the credential was stored

Changes