Skip to main content
const credential = await store.createGitCredential({
  repoId: repo.id,
  username: 'git',
  password: 'YOUR_ACCESS_TOKEN_OR_PASSWORD',
});

console.log(credential.id);

Options

repoId
string
required
The ID of the repository to attach the credential to.
username
string
Git username. Optional for providers that accept a token without a username.
password
string
required
Git password or access token used to authenticate with the upstream provider.

Response

id
string
The credential ID. Use this to update or delete the credential later.
createdAt
string
ISO 8601 timestamp of when the credential was created.