Use dulwich as Git client in GitBackend #7912

Closed
opened 2025-12-29 20:29:55 +01:00 by adam · 2 comments
Owner

Originally created by @tobiasge on GitHub (Apr 17, 2023).

Originally assigned to: @tobiasge on GitHub.

Proposed Changes

Use the Python Git library dulwich in the GitBackend class instead of invoking the external Git binary.

Justification

  • More control over the dependency as Git is usually installed by the OS
  • Smaller image size with Netbox Docker image
Originally created by @tobiasge on GitHub (Apr 17, 2023). Originally assigned to: @tobiasge on GitHub. ### Proposed Changes Use the Python Git library [dulwich](https://pypi.org/project/dulwich/) in the GitBackend class instead of invoking the external Git binary. ### Justification - More control over the dependency as Git is usually installed by the OS - Smaller image size with Netbox Docker image
adam added the status: acceptedtype: housekeepingbeta labels 2025-12-29 20:29:55 +01:00
adam closed this issue 2025-12-29 20:29:55 +01:00
Author
Owner

@tobiasge commented on GitHub (Apr 17, 2023):

The needed changes can be found here: ff6e057edd

@tobiasge commented on GitHub (Apr 17, 2023): The needed changes can be found here: https://github.com/tobiasge/netbox/commit/ff6e057edd23452ca898c85b8ad3ef1c1b291ad5
Author
Owner

@jeremystretch commented on GitHub (Apr 17, 2023):

Makes sense to me. Dulwich seems like a mature product, and I'd love to obviate use of the binary client. @tobiasge would you like to put in a PR with your proposed changes?

@jeremystretch commented on GitHub (Apr 17, 2023): Makes sense to me. Dulwich seems like a mature product, and I'd love to obviate use of the binary client. @tobiasge would you like to put in a PR with your proposed changes?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7912