How to move local Git repository (with history) to be managed by Gitosis on remote server?

I’m switching from SVN to Git with Gitosis installed on a central server for centralized repositories on Ubuntu server.

I have had all my SVN repositories moved and initiated into new Git repositories, and also had all history moved to Git.

Now that I have all the repositories migrated to Git, I want to add all the repositories into Gitosis to be managed by Gitosis.

How can I move the repositories (Git initiated ones) into Gitosis /srv/gitosis/repositories and manage them through gitosis-admin.git remotely?

  • Gitosis post-receive hook to deploy repository getting public key errors
  • gitosis + git error: fatal: '/home/git/repositories/idea-generator.git' does not appear to be a git repository
  • Git “ERROR:gitosis.serve.main:Repository read access denied” when using public keys
  • Preventing git push from sending entire repo if not up-to-date
  • Execute PHP from GIT post-update hook
  • Why is the Git Plugin for Jenkins rewriting my local git repo url with extra slashes?
  • Git aliases that are stored in origin
  • gitosis vs gitolite?
  • 2 Solutions collect form web for “How to move local Git repository (with history) to be managed by Gitosis on remote server?”

    The idea is to declare you repo in the conf/gitosis.conf file from your gitosis-admin local (cloned) repo:

    [group groupname]
    writable = reponame
    members = username
    git add -A
    git ci -m "updated configuration"
    git push

    , which will create a bare repo, to which to which you can push your local repo.

    mkdir myproject
    cd mypyroject
    git init
    # do some work, git add and commit files
    # Then add your server as a remote and push:
    git remote add serveralias git@hostname:reponame.git
    git push serveralias master

    See this tutorial for more

    That being said, I find gitolite much more complete than gitosis, like all those recent blog posts illustrate:

    • A Pure Git Deploy Workflow (with Jekyll and Gitolite)
    • Git Repository Server using Gitolite
    • Gitolite installation with gitweb and anongit in Gentoo and Debian

    And you can migrate from gitosis to gitolite easily enough.

    I recommend this tutorial for managing gitosis repositories if you have successfully installed it:

    Most of the normal management work (Add new administrator, Create a new user, Create a new repository, etc) can be done on administrator’s side by editing and pushing gitosis-admin repository. You need to login to the gitosis server to do other things like adding hook script to send email automatically when somebody pushes, etc.

    Git Baby is a git and github fan, let's start git clone.