2

I'm using the 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

I successfully created a project newrepo3 and cloned it using:

$ 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.

But when I try to push a commit to it fails:

$ git push
fatal: remote error: access denied or repository not exported: /git/newrepo3

Note that I'm using the git:// protocol, not the ssh:// one.

sashoalm
  • 75,001
  • 122
  • 434
  • 781

1 Answers1

1

You should not be using git protocol for pushing, because it does not support authentication. It it technically possible to enable though.

from 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

Community
  • 1
  • 1
max630
  • 8,762
  • 3
  • 30
  • 55