# Get Git credentials

Launch stage: GA

`GET /api/2.0/git-credentials`

Lists the calling user's Git credentials.

API scopes: workspace

## Query parameters

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

## Returns

Returns a list of Credential objects.

## Response

### Git credentials were successfully returned.

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

