arrow-left
All pages
gitbookPowered by GitBook
1 of 1

Loading...

Best practices

hashtag
Set your personal access token as a variable

Your Specify personal access token should always be private. We highly recommend you to set it in a private variable or in a .env variable.

hashtag
Using an .env variable in a config file in JavaScript

hashtag
Using a variable in a flag with the CLI

Set your personal access token as an environment variable and interpolate it in the CLI wit .

circle-info

You can use this method to sync Specify with git repositories in , , or .

the flag -parrow-up-right
GitLabarrow-up-right
GitHubarrow-up-right
Azure DevOpsarrow-up-right
Bitbucketarrow-up-right
.env
SPECIFY_TOKEN=ab83f8f49f5c65456c7b1fe70efbc804aa08f87150214aa984d4125945ed8283bash
const path = require('path');
const envFile = '.env';
require('dotenv').config({ path: path.resolve(process.cwd(), envFile) });

module.exports = {
  repository: '@workspace/repository',
  personalAccessToken: process.env.SPECIFY_TOKEN,
  rules: [],
};
specify pull -p $SPECIFY_TOKEN