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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:09:30+00:00 2026-05-19T04:09:30+00:00

I am looking for a way to host private git repos on my own

  • 0

I am looking for a way to host private git repos on my own server.
I am using Github for Open source projects of mine, but I would prefer to use my own server for storing private git repos.

Can someone suggest me on which script should I be using for this purpose.
Trac is not what I am looking for, though. I want something that is, preferably PHP based solution (just optional) and esp. something that has an easier UI.

Any help is appreciated here.

  • 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-19T04:09:31+00:00Added an answer on May 19, 2026 at 4:09 am

    Well, for non-gitosis/gitorious setup you have two options really:

    1. Give people linux accounts with full shells (passwords and/or ssh keys) to have access to the git repository.
    2. Give people access to a linux account via their ssh key being in /home/ac/.ssh/authorized_keys2 whose shell is set to /usr/bin/git-shell. This means they won’t be able to log in as a linux user with a shell and so do anything except use git on your machine.

    In both cases, the user in question needs (read|write|both) access to the git repository, according to your needs, either as a user or as part of a group.

    It might make sense for you to have a directory /git/project and then have user repositories in there, as having multiple people pushing to the same repository is generally a bad idea (people break things too easily in my experience). For example, you might have /srv/git/proj/proj-ninefingers.git and have a “release” repo of ‘/srv/git/proj/project.git` That’s probably what I’d do if running a team effort. Permissions, shells etc to be set as appropriate.

    Note that if you want to allow exports via the read-only git protocol you need to ensure the configured git user has read access and that git-daemon-export-ok exists in your bare repository. git update-server-info must also be run before gitweb will pick up the repository, should you wish to use that.

    As others have said, git gc optimises the repository and it is a good idea to do this regularly. Cron job?

    Finally, a plethora of frameworks exist to simplify this (gitosis, gitorious, …). I don’t think it gets any simpler than providing access to a folder via various mechanisms but then that’s me.

    As an example of my setup, it being only me, I have:

    $ cat /etc/passwd | grep git
    git:x:1002:1002:Antony Vennard,,,:/home/git:/usr/bin/git-shell
    gitdaemon:x:112:65534::/nonexistent:/bin/false
    $ cat /etc/group | grep git
    git:x:1002:
    $ ls -l /srv/git
    drwxr-xr-x 7 git  git 4096 2010-09-12 23:31 bsdnt.git
    drwxr-xr-x 7 git  git 4096 2010-06-16 22:32 vforth.git
    $ cat /home/git/.ssh/authorized_keys2
    ssh-rsa somehex user1
    ssh-rsa somehex user2
    

    This means anyone with the private key user1 can log in and commit to either of those repositories.

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

Sidebar

Related Questions

I am looking for a way to create/detect a cookie on a local host
I am using codeigniter and looking a way to enable directly editting of doc
I'm looking at way to easily have objects similar to 'fixtures', but for the
I was looking at using the WCF REST Service Application template to host all
What are the disadvantages (if any) of using a virtual private server instead of
Is there a generic way, without creating and managing your own CLR host, to
I'm writing some JVM instance related application and looking at open source to see
I am looking for a way to optimize the following code, for an open
OK, I am looking for a way to use GIT to keep a web
So i'm looking for a cost affective way to host a website in a

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.