Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8127167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:25:53+00:00 2026-06-06T07:25:53+00:00

I setup git on an ubuntu server and I was pushing the local repo

  • 0

I setup git on an ubuntu server and I was pushing the local repo to the server and getting the errors below. When I change the permissions of the two folders it works. I just want to understand why when I setup git init --bare it doesn’t just work with the permissions it creates. Also is 777 the best permissions to have for these folders? Is there a more legit way of fixing this?

The first error:

error: insufficient permission for adding an object to repository database ./objects

The first solution:

sudo chmod 777 objects/

The second error:

fatal: Unable to create '/srv/git/example.com.git/refs/heads/master.lock': Permission denied

The second solution:

sudo chmod 777 refs/heads/
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T07:25:54+00:00Added an answer on June 6, 2026 at 7:25 am

    Running

    $ git init --shared=0777 --bare
    

    should do what you want.

    From http://git-scm.com/docs/git-init

    Alternatively, you could set up an openssh server on your server and have users access this repository through ssh.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two issues. I have Ubuntu 10.10 and I have installed git server
I have a git repository setup on a server: andy@ubuntu:/home/git/repositories$ ls gitosis-admin.git GoGoFlow.git andy@ubuntu:/home/git/repositories$
I'm trying to install my own git server with these instructions. http://cisight.com/how-to-setup-git-server-using-gitolite-in-ubuntu-11-10-oneiric/ But I
I have setup a git repository in a linux server, and installed the latest
I was to setup an SSH Server to Host my Git Repository to my
Hello I am new to Git and trying to setup server part and client
I setup a git server over ssh as http://blog.commonthread.com/post/1034988660/setting-up-a-git-server However, I am still able
First of all, the setup: Server: Ubuntu 10.04 server mongod --version db version v1.2.2,
I have setup git server via ssh (one git account and many different public/private
We have a problem/misunderstanding with our current git setup. We have local master and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.