交钥匙版本控制设备:git 推送不适用于 git:// 协议
Turnkey Revision Control appliance: git push is not working for git:// protocol
我正在使用 TurnKey Revision Control appliance. I've created a new project following the steps from this forum post:
cd /srv/repos/git
git init --bare project.git
# to allow read-only access via git://...
touch project.git/git-daemon-export-ok
# to have your source show up in gitweb
cd public
ln -s /srv/repos/git/project.git project.git
我成功创建了一个项目 newrepo3
并使用以下方法克隆了它:
$ git clone git://192.168.143.12/git/newrepo3
Cloning into 'newrepo3'...
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (3/3), done.
但是当我尝试推送提交时失败了:
$ git push
fatal: remote error: access denied or repository not exported: /git/newrepo3
请注意,我使用的是 git://
协议,而不是 ssh://
协议。
您不应使用 git 协议进行推送,因为它不支持身份验证。不过,它在技术上是可以启用的。
来自 git-daemon docs:
receive-pack
This serves git send-pack clients, allowing anonymous push. It is disabled by default, as there is no authentication in the protocol (in other words, anybody can push anything into the repository, including removal of refs). This is solely meant for a closed LAN setting where everybody is friendly. This service can be enabled by setting daemon.receivepack configuration item to true
我正在使用 TurnKey Revision Control appliance. I've created a new project following the steps from this forum post:
cd /srv/repos/git git init --bare project.git # to allow read-only access via git://... touch project.git/git-daemon-export-ok # to have your source show up in gitweb cd public ln -s /srv/repos/git/project.git project.git
我成功创建了一个项目 newrepo3
并使用以下方法克隆了它:
$ git clone git://192.168.143.12/git/newrepo3 Cloning into 'newrepo3'... remote: Counting objects: 3, done. remote: Total 3 (delta 0), reused 0 (delta 0) Receiving objects: 100% (3/3), done.
但是当我尝试推送提交时失败了:
$ git push fatal: remote error: access denied or repository not exported: /git/newrepo3
请注意,我使用的是 git://
协议,而不是 ssh://
协议。
您不应使用 git 协议进行推送,因为它不支持身份验证。不过,它在技术上是可以启用的。
来自 git-daemon docs:
receive-pack
This serves git send-pack clients, allowing anonymous push. It is disabled by default, as there is no authentication in the protocol (in other words, anybody can push anything into the repository, including removal of refs). This is solely meant for a closed LAN setting where everybody is friendly. This service can be enabled by setting daemon.receivepack configuration item to true