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

# capy revoke-branch: Scriptable Branch Revoke

> Revoke a teammate's access to a protected branch from CI: capy revoke-branch <email> <project> <branch>. Immediate cryptographic inert, 403 on next decrypt.

## Synopsis

```bash theme={null}
capy revoke-branch <email> <project> <branch>
```

## Description

Revokes `<email>`'s grant on the named protected branch. Same operation as pressing `g` on a `(granted)` row in [`capy users`](/cli/users), in non-interactive form.

After revocation, the user's next attempt to co-decrypt that branch returns `403`. Their on-disk material for the branch becomes inert immediately (the service stops cooperating).

## Example

```bash theme={null}
$ capy revoke-branch alice@acme.com web-frontend production
Revoked alice@acme.com's access to web-frontend/production
```

## Failure modes

| Exit reason                            | Cause                                                  |
| -------------------------------------- | ------------------------------------------------------ |
| `Project "<name>" not found`           | The project name doesn't match any project in this org |
| `Branch "<name>" not found in project` | The branch doesn't exist in that project               |
| `No member with email "<email>"`       | The user isn't a member of this org                    |
| `Authentication failed`                | Your local session expired; run `capy` to re-auth      |

## See also

* [`capy grant-branch`](/cli/grant-branch) - the inverse
* [`capy users`](/cli/users) - interactive equivalent
* [Protected branches](/using/branches/protected) - the concept
