account/developer-access.md
at 55a1b0bDeveloper access
Give a tool access
Make a developer credential in the settings for a repository. A local tool or script can use it without browser sign-in.
Repository — Code and its change history. Its name has the form owner/repository.
Developer credential — A secret that gives a tool access to a repository. The developer credential belongs to your account.
API — An application programming interface. A tool sends HTTP requests to the API to read data or add comments.
Bearer header — The part of an HTTP request that sends the developer credential. Possession of the developer credential gives its access rights.
A tool can read repository data or add comments. The selected operations and your repository permissions control its access.
Find the correct settings
| Page | Purpose |
|---|---|
| Repository → Settings → Developer access | Make a developer credential for this repository. |
| Owner → Settings → Developer access | Find links to settings for the owner's repositories. |
| Account → Authorized tools | Examine or revoke your developer credentials across repositories. |
An owner is the user or organization that owns a repository. The owner overview has links to repository settings.
The owner overview does not make a shared organization credential. Each developer credential uses the account of the user who made it.
The repository settings path is /OWNER/REPO/settings/developer. The owner overview path is /OWNER/settings/developer.
OWNER and REPO are placeholders for the owner and repository names.
Make a developer credential
Your account must have access to the repository. Sign-in confirmation lasts five minutes.
- Open the repository in Nerudo.
- Select Settings.
- Select Developer access.
- Confirm your sign-in with a connected sign-in method.
- Enter a tool name in Credential name.
- Make sure that Repository shows the correct
owner/repository. - Under Allowed operations, select only the necessary operations.
- For data access, keep Read repository data selected.
- If the tool must add comments, select Add comments.
- Under Expires in, select 7, 30, or 90 days.
- Select Create credential.
- Save the developer credential in your password manager.
Nerudo shows the developer credential only once. The value starts with nrd_dev_ and has 43 more characters.
The repository is fixed for the new developer credential. The form does not accept a list of repositories.
The list shows the repository, operations, and expiration date. The developer credential stops at expiration or revocation.
Nerudo does not give the tool more rights than your account. Your account must still have repository access for each request.
Use the developer credential
Environment variable — A named value that a program receives from its environment. This example uses NERUDO_TOKEN.
-
Use your password manager to supply the developer credential in the
NERUDO_TOKENenvironment variable. -
Replace
OWNER/REPOwith the repository from the credential form in the command below. -
Enter this command:
bashcurl --fail --silent --show-error \ --header "Authorization: Bearer $NERUDO_TOKEN" \ 'https://nerudo.dev/v1/repos/OWNER/REPO/api/state'
JSON is a text format for structured data. After a correct request, the API returns repository data as JSON.
If access fails, examine the selected repository, operations, and expiration date. Your account must still have repository access.
Examine or revoke authorized tools
Authorized tools is your account inventory. It shows your developer credentials across repositories.
The account inventory does not have a credential form. New developer credentials come from repository settings.
Credentials made earlier can include more than one repository. Their selected repositories and operations do not change.
You can still examine or revoke those developer credentials. Your repository permissions control their access.
- Open Authorized tools.
- Find the developer credential by its name and repositories.
- Select Revoke credential.
The Revoke credential control stops future requests with that developer credential. It can stop access to all repositories in that credential.
You can revoke only your own developer credentials. The owner overview does not give access to other users' credentials.
Protect the developer credential
Keep the developer credential secret. Do not put it in a URL, Git file, screenshot, or shared log.
A developer credential does not give Git clone, Git push, landing, approval, administration, or agent delegation rights.
Landing adds an approved change to a repository. Agent delegation gives an agent authority to act for you.
If another person gets the developer credential without permission, select Revoke credential. Make a new developer credential if necessary.