API token Git authentication in Buddy-hosted repositories

API token Git authentication in Buddy-hosted repositories

October 27, 2021

Besides support for external Git hosting services such as GitHub and Bitbucket, Buddy offers native code hosting directly in the service. This solution is good for users who want to keep everything in one place, especially developers using the on-premises version.

With this week's release, we've added API token authentication to Buddy-hosted repositories, which means you can clone and push to your repository from the application level via the API.

Configuration

To generate the token, go to My ID settings and switch to APIPersonal Access Tokens:

Token settings

Enter the token name and define the settings:

  • To provide read-only access, the token must have the Read repositories scope.
  • To allow pushing changes to the repo, set the scope to Write to repositories (this scope includes RO access by default)

Buddy supports OAuth tokens and personal access tokens.

Accessing repository

To access the repository, run:

git clone https://$TOKEN@buddy.works/$WORKSPACE_NAME/$PROJECT_NAME
$

During the authentication, the token should be provided as username only (no password).

API documentation

To further increase security, from November 16, 2021, users with active 2FA will only be able to access the repository over SSH or a token over HTTPS (i.e. it will no longer be possible to clone the repository over HTTP using email & password with 2FA turned on).

Share

About the Author
Alexander Kus

Alexander Kus

Customer Success Manager
A story-teller and conversation-lover, Alexander decided to invest his skills to help his friends at Buddy transform the cold language of patch notes into exciting narratives. Also: an avid gamer, hip-hop DJ, Liverpool FC fan, absentminded husband, and the father of two.

With Buddy even the most complicated CI/CD workflows take minutes to create

Sign up for Buddy CI/CD

Start a free trial

Trusted by customers from 170+ countries