API token Git authentication in Buddy-hosted repositories

API token Git authentication in Buddy-hosted repositories

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:

Image loading...

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)

Image loading...

Success
Buddy supports OAuth tokens and personal access tokens.

Accessing repository

To access the repository, run:

bash
git clone https://$TOKEN@buddy.works/$WORKSPACE_NAME/$PROJECT_NAME$
Hint
During the authentication, the token should be provided as username only (no password).

API documentation

Warning
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).
Jarek Dylewski

Jarek Dylewski

Customer Support

A journalist and an SEO specialist trying to find himself in the unforgiving world of coders. Gamer, a non-fiction literature fan and obsessive carnivore. Jarek uses his talents to convert the programming lingo into a cohesive and approachable narration.

Oct 27th 2021
Share