Set Up Your Vault
How to create the Vault file, a secure place for your source and destination credentials.
Last updated
Was this helpful?
How to create the Vault file, a secure place for your source and destination credentials.
Last updated
Was this helpful?
Now that you’ve gathered your source and destination credentials, you need to make them available to Warp so that it can perform migrations.
You also need to ensure that these credentials are secured so that only Warp can use them. You’ll do this by setting up a Vault — an encrypted file containing the credentials. To decrypt these credentials, you’ll provide Warp with the Vault key, the decryption key for the Vault file.
In this section, you’ll set up the Vault by creating the Vault file, creating a Vault key, pushing the Vault file to Migration HQ, and installing the Vault key as a secret in Migration HQ. You’ll do all this by using the GitHub CLI application with the Warp command-line extension and confirm it was done by looking at the updates to Migration HQ.
At the end of this section, you will have a Vault file uploaded to Migration HQ, which will provide Warp with the credentials necessary for performing your migrations.
🛠️ Open a command-line terminal on your computer, using the Terminal application on macOS or Linux, or Command Prompt or PowerShell on Windows and change to the directory containing the cloned Migration HQ repository.
🛠️ Run the following command, which starts the Warp command-line application that sets up the Vault:
You will see the “Welcome” text pictured below:
🛠️ Press the Enter or Return key to continue.
You will see the Configure Providers menu, which lets you add, update, and delete tokens for various source control providers:
🛠️ The default option, Add a New Provider, is the one you want. Press the Enter or Return key to select this option.
You will be taken to the Add Provider Credentials menu:
🛠️ Let’s add the personal access token for Azure DevOps first. Since Azure DevOps is the default option, simply press the Enter or Return key to select it.
You’ll see this text, which explains that you’re about to configure an Azure DevOps provider:
🛠️ Press the Enter or Return key to continue.
You will now be prompted to enter the personal access token you created in Azure DevOps:
🛠️ Paste your Azure DevOps personal access token into the text area marked Your PAT...
🛠️ ...then press the Enter or Return key to continue.
The next step is to specify the access scope for the Azure DevOps personal access token:
🛠️ Select Single organization access using the ⬆️ and ⬇️ keys, then press the Enter or Return key.
You’ll be asked to enter the Azure Devops organization slug, which you copied when you were creating the personal access token for your Azure DevOps organization. In this example, the slug is joey-ado-testing
:
🛠️ Paste or enter the organization slug into the text area marked ado-organization-slug...
🛠️ ...then press the Enter or Return key to continue.
You’ll then be asked to specify the number of days until the token expires:
🛠️ Enter 30, then press the Enter or Return key.
Finally, you’ll be asked to confirm the information you’ve entered:
🛠️ Press y to confirm that the information is correct.
It’s time to add the personal access token for GitHub. You’ll see the Configure Providers menu again:
🛠️ Once again, the default option, Add a New Provider, is the one you want. Press the Enter or Return key to select this option.
🛠️ Select GitHub [Destination] using the ⬆️ and ⬇️ keys, then press the Enter or Return key.
You’ll see this text, which explains that you’re about to configure a GitHub destination:
🛠️ Press the Enter or Return key to continue.
You will now be prompted to enter the personal access token you created in GitHub:
🛠️ Paste your GitHub personal access token into the text area marked Your PAT...
🛠️ ...then press the Enter or Return key to continue.
You’ll be asked to enter the GitHub organization slug, which you copied when you were creating the personal access token for your GitHub organization.
In this example, the slug is Hypotheticorp01
:
🛠️ Paste or enter the organization slug into the text area marked destination-organization-slug, then press the Enter or Return key to continue.
You’ll then be asked to specify the number of days until the token expires:
🛠️ Enter 30, then press the Enter or Return key.
Finally, you’ll be asked to confirm the information you’ve entered:
🛠️ Press y to confirm that the information is correct.
You will return to the Configure Providers menu:
🛠️ Select Exit and Save Changes using the ⬆️ and ⬇️ keys, then press the Enter or Return key.
This will create the Vault file, which needs to be committed and pushed to the Migration HQ repository. You will see this prompt:
🛠️ Use the default option, Yes, then press the Enter or Return key.
You will see the Save Your Vault Key prompt:
🛠️ Just as you did with the personal access token in Azure DevOps and GitHub, copy the Vault key and save it in a safe place — preferably a password manager. You will need it to unlock the personal access tokens that were encrypted into the vault.
🛠️ After you have copied and saved the Vault key, press the Enter or Return key to continue.
You’ll see the final message:
At this point:
The Azure DevOps and GitHub personal access tokens have been encrypted into the Vault file (config/vault.age
on macOS and Linux, config\vault.age
on Windows)
The Vault file has been committed and pushed to the Migration HQ repository.
To ensure that your Vault File contains the correct credentials, we’ve included a utility to check it. Let’s use it now.
🛠️ Run the following command, which starts the Warp command-line application that checks the Vault file:
You’ll be greeting with this text asking for your Vault key:
🛠️ Paste the Vault key into the text area...
🛠️ ...then press the Enter or Return key to continue.
The utility will check the credentials in your Vault file. If the credentials are valid, you’ll see this display with the text All credentials are valid, as shown below:
🛠️ If you see the All credentials are valid message, proceed to the next step. Otherwise, repate the Create the Vault File step.
Just to be certain, let’s take a look at Migration HQ to make sure that the Vault was actually pushed there.
🛠️ Open Migration HQ in a browser tab or panel and select the Code tab:
🛠️ Look at the files in the directory and look at the config
directory’s last commit message: “Update Vault.”
Also, take note that its commit time is more recent than any of the other items in the repository.
🛠️ Open the config
directory:
🛠️ Look at the Vault file — once again, it’s vault.age
. Its last commit message and last commit date confirm that it was pushed to Migration HQ at the end of the Vault creation process.
The next step is to store the key for the Vault in the Migration HQ repository. This will allow Warp’s GitHub Actions to access the personal access tokens you encrypted into the Vault, which in turn will allow them to migrate your repositories from Azure DevOps to GitHub.
You could do this manually by copying the Vault key and pasting it into the Migration HQ repository’s Secrets section. However, Warp provides a command-line application that will do this for you. Let’s use it.
🛠️ Run the following command, which starts the Warp command-line application that stores the Vault key in the Migration HQ repository:
You’ll be greeted with the following text:
🛠️ Press the Enter or Return key to continue.
You’ll be prompted to enter your Vault key:
🛠️ Paste the Vault key into the text area...
🛠️ ...then press the Enter or Return key to continue.
The app will store your Vault key into the Migration HQ repository’s secrets and display this message:
You should confirm that your Vault key was successfully stored in Migration HQ by checking the repository’s Secrets section in GitHub.
🛠️ Open a browser tab or window to the Migration HQ repository in GitHub and click the Settings tab.
🛠️ In the menu on the left side of the page, select Secrets and variables to expand it, then select Actions:
You will be taken to the Actions secrets and variables page for Migration HQ :
🛠️ Check the Repository secrets section and confirm that it contains a secret named PKFS_MASTER_KEY
.
If you see the PKFS_MASTER_KEY
secret, you have successfully stored the Vault key in Migration HQ. If not, you should run the gh warp vault place
command again.
With the Vault file and secret install in Migration HQ, Warp now has the credentials to access your source repositories and destination GitHub organization. You’re ready to scan your source for repositories.
Search for the 🛠️ emoji if you’d like to skim through this content while focusing on the steps you need to follow.