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 6008349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:48:41+00:00 2026-05-23T01:48:41+00:00

I have set up a git repository on my server. Created a new user

  • 0

I have set up a git repository on my server. Created a new user ‘git’. My repos are located in /srv/git/example.git. I was able to git remote add origin git@domain/srv/git/example.git then I added and committed my changes.

However when I tried git push origin master it failed on:

fatal: unable to create temporary file: permission denied’ and ‘fatal: sha1 file write error: invalid argument’

On the server I ran:

sudo chown -R git:git /srv/git/`

This fixed my problem but I am wondering if this was the correct thing to do?

  • 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-05-23T01:48:42+00:00Added an answer on May 23, 2026 at 1:48 am

    On the server I ran sudo chown -R git:git /srv/git/ – this fixed my problem but I am wondering if this was the correct thing to do?

    Absolutely. The problem previously was that the git user, who you’re logging in as via SSH, could not write to the repository.

    Depending on your needs, you may consider different combinations of users and SSH keys, or one of the many additional programs (gitolite etc) that can be used to more finely control access.

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

Sidebar

Related Questions

I have a repository set up on a server running Git, the repository has
We have set up a system where notifications get sent to a user with
I'm attempting to put a bare git repository on a ubuntu server running on
I currently have git and virtualenv set up in a way which exactly suits
I currently have Git setup with a central bare repository which is accessed by
I have set a canvas' background to an image of a company logo. I
I have set up transactional replication between two SQL Servers on different ends of
I have set up a version control system using TortoiseSVN at my home to
I have set up a Django application that uses images. I think I have
I have set the FlushMode property on an NHibernate session to FlushMode.Never, but when

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.