---
title: "Authorise and repair credentials"
url: "https://docs.alisx.com/how-to/alis-build/authorise-and-repair-credentials/"
---
# Authorise and repair credentials

Repair git and package registry credentials for a product, and collect diagnostics when something on your machine does not work.

## Prerequisites

- You are signed in. `alis whoami` shows the authenticated user. Exit code 4 from any command means you are signed out: run `alis login` and retry.

## Refresh git and package credentials

```bash title="Terminal"
alis authorise acme.sh
```

Alias: `alis a` (and `alis authorize`). This configures the product's local define and build repositories to use the auto-refreshing Alis git credential helper, and refreshes the short-lived Go, npm, Docker and Dart package credentials. Run it:

- once for a repository cloned outside the CLI, or one that predates the credential helper;
- when git prompts for a password or fails authentication because the helper is missing or a stale `http.extraHeader` is still configured;
- to refresh package credentials without running a package command.

Do not run it before every git operation: the configured helper refreshes tokens on demand. `alis packages install|upgrade|add` refresh their own credentials.

## Fix a local build that cannot download Alis packages

An error such as `unrecognized import path "alis.build/..."` or a TLS error on `alis.build` means the package manager has no credentials. Run the install for that language:

```bash title="Terminal"
alis packages install acme.sh.orders.v1 --language go
```

Do not copy `GOPROXY` values or tokens from a Dockerfile or shell history, and never bypass TLS.

## Inspect the configuration

```bash title="Terminal"
alis git configure acme.sh
alis gcloud auth acme.sh
```

`git configure` displays the git user and remote URLs of the product's repositories without changing anything. `gcloud auth` shows the current Artifact Registry, npm and Dart tokens for the product, for tools that need them directly.

## Collect diagnostics

```bash title="Terminal"
alis doctor
```

Collects a snapshot of the local environment: CLI, IDE extension and agent plugins compared with the detection cache, setup state, terminal and host shape, settings and the recent log tail. Credentials and tokens are never included. `--no-logs` leaves out the log tail. When a build specialist asks for it, `--ticket <id>` uploads the snapshot to that conversation after a confirmation (`--yes` skips the prompt).

## Reach a build specialist

```bash title="Terminal"
alis specialist send-message --message "alis build acme.sh.orders.v1 fails with PermissionDenied since this morning"
```

Every builder has a build specialist. Describe the problem, its impact, the command and the exact error; `alis specialist get <ticket>` reads the reply. In the TUI, ++s++ opens the same conversation.

## Related

- [Install and upgrade packages](https://docs.alisx.com/how-to/alis-build/install-and-upgrade-packages.md)
- [CLI command index](https://docs.alisx.com/reference/cli/index.md)
