Using Git with Positron Pro

Positron Pro sessions in Posit Workbench can connect to remote Git repositories hosted on GitHub, GitLab, Bitbucket, Azure DevOps, and other version control services.

This page covers how to set up version control credentials in your Workbench session. For a complete guide to the Git workflow in Positron, including staging, committing, branching, and resolving conflicts, see Git Version Control in the Positron guide.

Using the terminal

Users can work with Git via a terminal in Positron Pro. To open a terminal using the Command Palette:

  • Press Cmd + Shift + P on macOS or Ctrl + Shift + P on Windows and Linux.
  • Then, type “Terminal: Create New Terminal” and press Enter.

Setting up Git credentials

Because a Workbench session runs on a remote server, you need to set up your Git credentials from within the session, rather than on your local machine. Most Git-hosting providers support two authentication approaches: SSH keys and HTTPS with a personal access token (PAT).

From a terminal in your session, generate an SSH key pair or a PAT, then register it with your Git hosting provider. For step-by-step instructions, refer to your provider’s documentation:

Provider SSH keys Personal access tokens
GitHub Add a new SSH key Manage personal access tokens
GitLab Add an SSH key Create a personal access token
Bitbucket Set up SSH keys Create an app password
Azure DevOps Use SSH key authentication Use personal access tokens
NoteCredential persistence

Your Git credentials are stored to the default global cache. If your sessions use ephemeral storage, you might need to reconfigure credentials each time you start a new session or configure Git to store credentials to a local file in your persistent home directory with git config --global credential.helper 'store --file ~/.my-credentials'. Contact your administrator if you are unsure.

Using the Source Control view

Positron Pro includes built-in source control management through the Source Control view in the Activity Bar.

Set up your Git credentials before you clone. The Source Control view uses the same SSH key or personal access token you configure for the terminal, described in Setting up Git credentials above.

To clone a repository:

  1. Open the Command Palette by pressing Cmd + Shift + P on macOS or Ctrl + Shift + P on Windows and Linux.

  2. Search for Workspaces: New Folder from Git and enter the repository URL.

For the full Source Control workflow, see Git Version Control in the Positron documentation.

Back to top