Last active
April 21, 2017 01:03
-
-
Save milisarge/bd5269d35d888bb065e9ffa31ac9199e to your computer and use it in GitHub Desktop.
ipv6 dulwich git sunucu-git server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# -*- coding:utf-8 -*- | |
from dulwich.repo import Repo | |
from dulwich.server import DictBackend, TCPGitServer | |
import threading | |
import socket | |
import os | |
TCPGitServer.address_family = socket.AF_INET6 | |
aktaran=b"Milisarge <milisarge@gmail.com>" | |
port=8003 | |
repoisim=b"irclog" | |
if os.path.exists(repoisim): | |
repo = Repo(repoisim) | |
else: | |
repo = Repo.init(repoisim,mkdir=True) | |
cid = repo.do_commit(b"mesaj", committer=aktaran) | |
backend = DictBackend({b'/'+repoisim: repo}) | |
dul_server = TCPGitServer(backend, b'::', port) | |
threading.Thread(target=dul_server.serve).start() | |
print dul_server.socket.getsockname() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment