search

Home  >  Q&A  >  body text

Server side - git server construction

Hello teachers, I want to build a git server to host the code in the near future. Apache is required for HTTP transmission. Since the project is relatively small, there is no need for user management functions. However, following online tutorials, I made the following settings for apache

When following the steps below, git push cannot be successful
git init --bare project.git
cd project.git
git init
git add .
git commit - a -m 'origin create'
git remote add origin http://127.0.0.1/git/project.git
git push origin master
chown -R apache: apache. The main reason is that the git warehouse must be changed to apache
When creating a git server for the first time, there is an error in the git client submission. Configure the following command on the git server
git config receive.denyCurrentBranch ignore
error prompt Yes
git push origin master has the following error
fatal: unable to access 'http://127.0.0.1/git/test/': The requested URL returned error: 403

Please ask the teachers for some guidance. .

PHP中文网PHP中文网2794 days ago556

reply all(2)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-02 09:29:32

    Recommend GOGS We are using this now and it is pretty good, it is very easy to install. Just run a script and forget about anything else. Everything else just needs to be filled in one by one according to the form on the page.

    reply
    0
  • ringa_lee

    ringa_lee2017-05-02 09:29:32

    When you add the server address, do you need to write less than one slash?

    reply
    0
  • Cancelreply