Migrating to Key-based Authentication
Head’s up! We’re making some changes to how Forestry authenticates with your Git repos.
Today, we rolled out an update that uses persistent SSH keys to interact with your repo. Previously, we were relying on OAuth tokens to gain access as needed, but some users were encountering problems with this method as tokens would intermittently expire before they could be refreshed. Using long-lived SSH credentials is intended to solve this problem.
What this Means For Your Projects
Your existing projects should continue to work as usual, but we recommend you switch them over to key-based authentication at your convenience. We will be sunsetting token-based authentication on February 1, 2019.
How to Migrate Your Project
To migrate your Github or GitLab project to key-based authentication, all you need to do is open your site in Forestry, navigate to the Repository tab in your Settings, and click the Test Connection button. You should see a message indicating the connection failed, and an option to reconnect. Click the Reconnect button, and if you see that you have reconnected successfully, you are finished migrating to key-based authentication.
Bitbucket users: Unfortunately, the Bitbucket API does not currently allow us to automatically set up SSH keys. To migrate your Bitbucket project, you will want to follow the “completing the connection” steps from our manual project setup guide.
Creating New Projects
When you create a new project in Forestry, you will now notice a Quick Setup via OAuth option. This is the recommended option and will follow the same setup flow you’re used to, but will create the persistent SSH key behind the scenes.
Because we are currently unable to automatically apply SSH keys to Bitbucket accounts, the Quick Setup via OAuth option is not available for Bitbucket projects. Please consult our manual project setup guide for instructions on setting up a new Bitbucket project.
More Info on Source Provider Connections
Caught a mistake or want to contribute to the blog? Edit this page on Github!