Buf

김신영·2024년 5월 21일
0

DevTool

목록 보기
6/6
post-thumbnail

Manage tokens

Create an API token

  1. Sign up or log in at https://buf.build/login.

  2. Go to your account settings.

  3. Click the Create New Token button, select an expiration time, and add a note for yourself to distinguish this token from others.

  4. Click Create and copy the token to your clipboard.

This token identifies you to the BSR and must be kept secret.

Authenticate the Buf CLI

Log in and update .netrc file

For local development, we recommend using a .netrc file to authenticate when using the Buf CLI. To authenticate with a .netrc file:

  1. Log in to the BSR from the command line
buf registry login

If you're on a private BSR instance, specify your domain in the command:

$ buf registry login <PRIVATE_BSR_SERVER>
  1. The Buf CLI will prompt you for your BSR username and a token. Provide them, and the resulting .netrc file looks like this:

~/.netrc

machine buf.build
    login rolroralra
    password <TOKEN>
machine go.buf.build
    login rolroralra
    password <TOKEN>`
profile
Hello velog!

0개의 댓글