Re: Functional GIT on F11 ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Aaron Gray wrote:
> I have set '/pub/git/expermental' to 'git:gitgroup'
>
> and added 'gitgroup' as a group to 'ang'
>
> remotely this fails :-
>
> ang@AMD2500-PC ~/git/experimental
> $ git push ssh://git.cybercomms.org/pub/git/experimental/.git
> ang@xxxxxxxxxxxxxxxxxx's password:
> Counting objects: 3, done.
> Compressing objects: 100% (2/2), done.
> Writing objects: 100% (2/2), 234 bytes, done.
> Total 2 (delta 1), reused 0 (delta 0)
> error: insufficient permission for adding an object to repository database
> ./obj
> ects
> fatal: failed to write object
> error: unpack failed: unpacker exited with error code
> To ssh://git.cybercomms.org/pub/git/experimental/.git
>  ! [remote rejected] master -> master (n/a (unpacker error))
> error: failed to push some refs to 'ssh://
> git.cybercomms.org/pub/git/experimenta
> l/.git'
>  But if I set ''/pub/git/expermental' to 'ang:ang' then it works.

Is /pub/git/experimental set to be a shared repo?  What is the output
of:

    $ git --git-dir /pub/git/experimental config core.sharedRepository

It should report true.  If not, set that via:

>>>>     # Tell git the repository is shared
>>>>     $ git --git-dir /pub/git/experimental config core.sharedrepository true

Then check that you've set all the permissions as outlined below:

>>>>     # Set proper group ownership
>>>>     $ chgrp -R gitgroup /pub/git/expermental
>>>>
>>>>     # Make all directories setgid
>>>>     $ find /pub/git/expermental -type d -exec chmod g+s {} \;
>>>>
>>>>     # Ensure files and dirs are group writable
>>>>     $ find /pub/git/expermental/ \( -type f -o -type d \) -a \
>>>>                           \( -perm /u+w -a ! -perm /g+w \) \
>>>>         xargs chmod g+w

Lastly, it's generally a good idea to only ever push to a 'bare'
repository, i.e. a repository that has no working directory associated
with it.  This isn't related to your permissions problem, but it is
something that can bite you later, so it's worth mentioning.  When you
create a remote repository, it should generally be done using either:

    $ git clone -q --bare some/git/url /path/to/new/repo.git
or
    $ git --git-dir /path/to/new/repo.git --bare init --shared=true

By convention, bare repositories end with .git.

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Living in a vacuum sucks.
    -- Adrienne E. Gusoff

Attachment: pgpc5aRkw8c7X.pgp
Description: PGP signature

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux