Hasty Briefsbeta

Bilingual

Using Git-upload-pack for a simpler CI integration

a year ago
  • #Git
  • #CI/CD
  • #Security
  • Screenshotbot does not require read-access to GitHub repositories, enhancing security and ease of integration with various Git providers.
  • The platform uses a 'commit-graph' to track commit SHAs and their parents, without storing additional repository data.
  • Challenges include difficulty supporting shallow clones and inefficiency with large monorepos.
  • A new feature utilizes the git-upload-pack protocol to efficiently fetch commit information via SSH, bypassing the need for GitHub-specific APIs.
  • The git-upload-pack protocol involves server-client negotiation for refs and commits, using packfiles for data transfer.
  • Implementation of git-upload-pack in Screenshotbot allows for shallow clones and reduces network traffic by avoiding unnecessary blob transfers.
  • Caveats include the protocol's complexity, variations in Git server behaviors, and specific requirements like multi_ack mode for Azure DevOps.
  • The update enables Screenshotbot users to utilize shallow clones, improving build times.