> ## Documentation Index
> Fetch the complete documentation index at: https://code.storage/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# store.updateGitCredential()

> Update an existing Git credential for a repository.

> [!WARNING]
>
> This page documents the earlier Code Storage SDKs: `@pierre/storage`, `pierre-storage`, and
> `code-storage-go`. New code uses the [Pierre SDK](https://code.storage/docs/sdks.md). To move code to the new SDK, use the
> [`pierre-migrate`
> skill](https://github.com/pierrecomputer/skills/tree/main/skills/pierre-migrate).

```typescript TypeScript theme={null} theme={"theme":{"light":"github-light","dark":"min-dark"}}
await store.updateGitCredential({
  id: credential.id,
  username: 'git',
  password: 'NEW_ACCESS_TOKEN',
});
```

```python Python theme={null} theme={"theme":{"light":"github-light","dark":"min-dark"}}
await storage.update_git_credential(
    id=credential.id,
    username="git",
    password="NEW_ACCESS_TOKEN",
)
```

```go Go theme={null} theme={"theme":{"light":"github-light","dark":"min-dark"}}
_, err := client.UpdateGitCredential(context.Background(), storage.UpdateGitCredentialRequest{
	ID:       credential.ID,
	Username: "git",
	Password: "NEW_ACCESS_TOKEN",
})
```

## Options

**id** `string` *required*

The credential ID returned by `createGitCredential()`.

**username** `string`

Updated Git username. Optional for providers that accept a token without a username.

**password** `string` *required*

Updated Git password or access token.

## Related

* [createGitCredential()](https://code.storage/docs/sdk/repos/git-credential-create.md)
* [deleteGitCredential()](https://code.storage/docs/sdk/repos/git-credential-delete.md)
* [Generic Sync](https://code.storage/docs/repos/generic-sync.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.