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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:56:15+00:00 2026-06-13T03:56:15+00:00

I’m trying to setup a Git repo on my local machine for work that

  • 0

I’m trying to setup a Git repo on my local machine for work that is being done on my local machine – no remote anything.

I’ve setup remote repos several times but it seems the steps I take locally always end up with errors.

I have 2 directories: /home/rico/project and /home/git/project_repo

I’ve created the git user to manage all my git repos (I expect to have dozens).

From /home/rico/project as the rico user I do the following command:

rico@verbal:~/project$ git init
Initialized empty Git repository in /home/rico/project/.git/

From /home/git/project_repo as the git user I do the following:

git@verbal:~/project_repo$ git --bare init
Initialized empty Git repository in /home/git/project_repo

Now I go back to my project and add files.

rico@verbal:~/project$ git status
# On branch master
#
# Initial commit
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       .project
#       .pydevproject
#       inc/
#       manage.py
#       rocksolidbox/
#       rsb/
#       templates/
rico@verbal:~/project$ git add inc media rocksolidbox/ rsb/ templates/
rico@verbal:~/project$ git commit -a -m "Initialize the project."

At this point I get the normal commit message – 23 files changed, 989 insertions(+) etc.

Now, I want to push this to the project_repo folder.

rico@verbal:~/project$ git remote add origin /home/git/rocksolidbox/
rico@verbal:~/project$ git push -u /home/git/rocksolidbox/ master

But receive the following error:

Counting objects: 31, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (26/26), done.
error: insufficient permission for adding an object to repository database ./objects

fatal: failed to write object
Writing objects: 100% (31/31), 12.24 KiB, done.
Total 31 (delta 2), reused 0 (delta 0)
error: unpack failed: unpack-objects abnormal exit
To /home/git/project_repo/
 ! [remote rejected] master -> master (n/a (unpacker error))
error: failed to push some refs to '/home/git/project_repo/'

Clearly this is a permissions error. I’ve tried to do the push such as:

rico@verbal:~/project$ git push -u git@verbal:/home/git/rocksolidbox/ master

Or even using my local IP:

rico@verbal:~/project$ git push -u git@192.168.1.101:/home/git/rocksolidbox/ master

It asks for a password, which I know I’m supplying correctly and I continually get the message Permission denied, please try again.

I just want to be able to push my project to my project_repo. What am I doing wrong in this setup?

  • 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-13T03:56:16+00:00Added an answer on June 13, 2026 at 3:56 am

    Ok, I’ve figured out a way around the permissions problem. Basically do this:

    git@verbal:~/$ chmod -R 777 project_repo
    

    Then I can do the following commands with my project:

    rico@verbal:~/project$ git remote add origin /home/git/project_repo/
    rico@verbal:~/project$ git push -u /home/git/project_repo/ master
    

    Then to clone the project elsewhere simply do:

    rico@verbal:~/some_other_location$ git clone /home/git/project_repo
    

    And you’re golden.

    Now, my question remains…is this the best way of handling the permissions problem? I don’t really like the idea of giving 777 to anything. Should I put git and rico in the same group and do 775 instead?

    Any suggestions?

    EDIT1:
    Putting git and rico in the same group and doing 775 did not help. It works fine with 777 but I don’t like this solution.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I
I am trying to render a haml file in a javascript response like so:

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.