# Get

Launch stage: GA

`GET /api/2.0/git-credentials/{id}`

Gets the Git credential with the specified credential ID.

API scopes: workspace

## Path parameters

- `id` (int64, optional)
  The ID for the corresponding credential to access.
  Example: `93488329053511`

## Query parameters

- `principal_id` (int64, optional)
  The ID of the service principal whose credentials will be modified. Only service principal managers can perform this action.
  Example: `8573549053511`

## Returns

- `credential_id` (int64, optional)
  ID of the credential object in the workspace.
  Example: `93488329053511`
- `git_provider` (string, optional)
  The Git provider associated with the credential.
  Example: `gitHub`
- `git_username` (string, optional)
  The username provided with your Git provider account and associated with the
   credential. For most Git providers it is only used to set the Git committer & author names for commits, 
   however it may be required for authentication depending on your Git provider / token requirements.
   Required for AWS CodeCommit.
  Example: `testuser`
- `name` (string, optional, Public Preview)
  the name of the git credential, used for identification and ease of lookup
  Example: `My GitHub PAT`
- `is_default_for_provider` (boolean, optional, Public Preview)
  if the credential is the default for the given provider
  Example: `false`
- `git_email` (string, optional)
  The authenticating email associated with your Git provider user account.
   Used for authentication with the remote repository and also sets the author & committer identity for commits.
   Required for most Git providers except AWS CodeCommit.
   Learn more at https://docs.databricks.com/aws/en/repos/get-access-tokens-from-git-provider
  Example: `user@your-organization.com`

## Response

### The credential was successfully returned.

```json
{
  "credential_id": "93488329053511",
  "git_provider": "gitHub",
  "git_username": "testuser"
}
```

