OAuth2.0 Code Repository Docking

The platform has built-in three commonly used code repositories: github, gitlab, and gitee

1. Github

The api version currently supported by Github is v3

2. Gitlab

The api version currently supported by Gitlab is v4

3. Gitee (Code Cloud)

Gitee currently supports the api version v5

Interface Implemented by Code Repository

  • Get user information
  • Get the user’s project list
  • Query items
  • Get the branches and tags of the project
  • Create webhook

Note: For security after gitlab version 10.6, webhook requests are not allowed to be sent to the local network

Solution: Enter the Admin area, in the Admin area, under the settings tab, find OutBound Request, check Allow requests to the local network from hooks and services, save the changes to solve the problem

4. Git Extension

For details, please refer to: https://github.com/gridworkz/kato-console/tree/master/console/utils/git_api/README.md