Project: Chef Habitat (App Definition and Development / Application Definition & Image Build)
File: builder_profile.md

+++ title = "Builder Profile" date = 2020-10-12T16:08:26-07:00 draft = false gh_repo = "habitat" [menu] [menu.habitat] title = "Builder Profile" identifier = "habitat/builder/builder-profile Builder Profile" parent = "habitat/builder" weight = 30 +++ Whether you are looking to leverage the SaaS or on-prem version of Chef Habitat Builder, you will need to create an account on the SaaS version of Chef Habitat Builder. After you have then downloaded the version, you will then sync the two accounts. This documentation covers everything from creating an account to setting up automated builds and exporting packages to a variety of container registries. You need to set a few things up before you can get started with Chef Habitat Builder: Download and install the A Chef Habitat Builder automatically creates your account the first time you sign in using the GitHub authentication process. You'll also need to authorize the Chef Habitat Builder application in Github. Head over to the Chef Habitat Builder sign-in page at to get started. To sign in with an existing GitHub account, select Sign in with GitHub If you need to set up a GitHub account, select the Sign up here link Signing in with your GitHub account and authorizing the Chef Habitat Builder application the first time you sign in grants you access to the Chef Habitat Builder platform. Once you've completed signing in and authorizing Chef Habitat Builder, you'll arrive at the 'My Origins' view. Use the Profile tab to: See the GitHub account used to sign in Add an email to your profile Create your personal access token Access your profile by selecting the round icon at the top right corner of any page. Select the profiles option from the drop-down menu to customize your profile and create your personal access token. Adding an email address to your profile gives the Chef Habitat team permission to contact you directly about important information. If you use an email address associated with a GitHub account, it will also use your GitHub avatar. Save your changes by selecting save. Chef Habitat Builder uses an access token, called a personal access token or a Habitat authentication token (HABAUTHTOKEN), to give you access to actions that you would like to take on Chef Habitat

The personal access token is the first level of permissions that you need to for any interactions with Chef Habitat Builder, such as uploading packages or checking the status of build jobs. Create your personal access token at the bottom of the profile page (below the save button), by selecting Generate Token. Your generated access token will appear in the field. The access token is visible in the tab once, and navigating away from or reloading the page will cause it to vanish from the display. Copy your access token by selecting the icon on the right side of the field and set it as an environment variable before continuing. You can use your personal access token as a for a single session by passing it in the command line or save it in your user settings for use across sessions. Save your personal authorization token as a permanent environment variable in Windows using: ```PS SETX HABAUTHTOKEN <token> /m ``` Replacing <token> with the contents of your generated personal access token. You can also save your personal access token as a permanent environment variable using the Windows user interface. In your Windows help bar, enter `environment` and select Edit the system environment variables from the list of suggestions. This opens the `System Properties` window on the `Advanced` tab. Select the `Environment Variables` button. In the next window, select the `New` button in the top part. This opens a dialog box that lets you set individual user variables. Create a permanent environment variable by entering `HABAUTHTOKEN` as the variable name. Next, paste the authorization token that you copied after you generated a new token on your profile page as the variable value. After you select the `OK`, you will see the new token in the user variables field. To test that your new token works correctly, open the Command Promptwhich you can find by entering command in the Windows search boxand entering `echo %HABAUTHTOKEN%`. You should see the value that you pasted into the environment variable. Set the `HABAUTHTOKEN` in the CLI with: ```bash export HABAUTHTOKEN=<token> ``` Replacing `<token>` with the contents of your generated personal access token. To use your personal access token across sessions, set it as an environment variable in your interactive shell configuration file, such as your `.bashrc`. ```bash export HABAUTHTOKEN=<token> ``` Then initialize the path from the command line, by running: ```bash source ~/.bashrc ```