Skip to main content

Configure Github

IconPaid feature

In this guide, we will explore how to configure GitSync using GitHub as the repository manager. By default GitSync is configured for the master branch.

Setting up Github in Paybill​

Role Required: Admin

  1. Create a New Repository
    Create a new repository on your GitHub. The repository can be public or private. You can also use an existing repository. Make sure that the repository is empty.

    GitSync
  2. Obtain the SSH URL
    When a repository is created, GitHub shows a screen with the SSH URL.

    GitSync

    OR

    If you are using an existing repository, then you can obtain the URL by clicking on the Code button.

    GitSync
  3. Go to the Admin settings, and click on the Configure git tab.
    (Example URL - https://my-company.paybill.dev/_admin/configure-git)

  4. Enter the SSH URL of the repository in the Git repo URL field.

  5. Click on the Generate SSH key button, and copy the SSH key that is generated. The SSH key is used to authenticate Paybill with the repository.

    There are two types of generated SSH keys:

    • ED25519: This is a secure and efficient algorithm that is used for generating SSH keys. It is recommended to use this key type. VCS providers like GitHub and GitLab recommend using this key type
    • RSA: This is an older algorithm that is used for generating SSH keys. It is not recommended to use this key type. Providers like Bitbucket recommend using this key type.

    GitSync
  6. Enable Deploy Key, click on the Org Settings button.

    Enable Deploy Keys
  7. Go to the Project Settings tab of the GitHub repository, and click on the Deploy keys tab. Click on the Add deploy key button.

    GitSync
  8. Enter a title for the SSH key in the Title field.

  9. Paste the SSH key generated from the Paybill.

  10. Make sure that the Allow write access checkbox is checked, especially when configuring the GitSync feature to push changes to Git. However, it is not mandatory to check this option when setting up the GitSync feature for pulling changes from Git.

  11. Finally, click on the Add key button.

    GitSync

    To deploy the SSH key for other git repository manager, such as GitLab and Gitea, follow the SSH Configuration guide.

  12. After deploying the SSH Key, go to the Configure git tab on Paybill, and click on the Finalize setup button. If the SSH key is configured correctly, you will see a success message.