v2git
所属分类:Telnet服务器
开发工具:GO
文件大小:0KB
下载次数:0
上传日期:2018-03-20 17:34:11
上 传 者:
sh-1993
说明: git http ssh服务器,
(git http ssh server,)
文件列表:
api/ (0, 2018-03-20)
api/api.go (556, 2018-03-20)
api/project.go (1345, 2018-03-20)
api/status.go (250, 2018-03-20)
auth/ (0, 2018-03-20)
auth/verify.go (983, 2018-03-20)
auth/verify_test.go (681, 2018-03-20)
cfg/ (0, 2018-03-20)
cfg/config.go (1012, 2018-03-20)
config.json.example (251, 2018-03-20)
git/ (0, 2018-03-20)
git/base.go (478, 2018-03-20)
git/common.go (371, 2018-03-20)
git/http.go (10038, 2018-03-20)
git/ssh.go (3384, 2018-03-20)
repo/ (0, 2018-03-20)
repo/project.go (1529, 2018-03-20)
utils/ (0, 2018-03-20)
utils/conv.go (747, 2018-03-20)
utils/conv_test.go (288, 2018-03-20)
utils/path.go (1275, 2018-03-20)
utils/path_test.go (472, 2018-03-20)
v2git.go (964, 2018-03-20)
## V2GIT
v2git 是一个 HTTP/SSH git服务器。
同时带验证,路由等功能
### 配置
```json
{
"http_port": 2000, // http 服务端口
"ssh_port": 2222, // ssh 服务端口
"git_bin_path": "/usr/bin/git", // git 路径
"git_user": "git", // 限制ssh的用户名
"repo_dir": "/Users/repos", // 仓库根目录
"auth_url": "http://127.0.0.1/api/auth", // 授权URL
"private_key_path": "/home/git/.ssh/id_rsa" // 私有key地址
}
```
### 验证
验证时会请求 auth_url。
请求:
```json
{
"path":"moli/hello.git",
// SSH
"fingerprint": "xx:xx:xx:xx……", // ssh验时的用户公有key指纹
// HTTP
"username": "moli",
"password": "123",
}
```
成功
```json
{
"result": 0
}
```
失败
```json
{
"result": 1 //Authentication Failed
}
```
近期下载者:
相关文件:
收藏者: