How can I enable anonymous read access (pull) but authenticated write access (push) to a git repository over http?

前端 未结 2 1936
慢半拍i
慢半拍i 2021-01-05 09:33

I want to have git repository available via \"smart\" HTTP to which only I can push, but which anybody (or anybody with account) can clone / fetch from.

2条回答
  •  醉酒成梦
    2021-01-05 10:01

    You have to update your repo .git/config file with the following value:

    [http]
        receivepack = true
    

提交回复
热议问题