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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:11:55+00:00 2026-06-07T00:11:55+00:00

I would like to clone a git project (from github, say), and have the

  • 0

I would like to clone a git project (from github, say), and have the top level directory be writable by group.

I tried a couple different things. First, just setting the umask before cloning.

$ umask
0002

Files that I create are then writable by group

$ touch test
$ ls -l test
-rw-rw-r-- 1 user group 0 2012-05-17 09:32 test

Now I try git clone

$ git clone git@github.com:user/repo.git
Cloning into repo... [succeeds]

But the clone directory not writable by group.

$ ls -ld repo
drwxr-xr-x 11 user group 4096 2012-05-17 09:32 repo

I tried the same thing with a repo created with git init --shared=umask (which should already be the default) in a directory with 775 permissions. After pushing to github git clone gets the same results.

This isn’t a huge deal, I can chmod in my checkout scripts. But if there’s a right/builtin way to do this, that’s preferable. Git is version 1.7.4.1 on Ubuntu 11.04.

Any ideas or links are appreciated. I saw this post, but it uses chmod, I haven’t been able to find much else on this. Thanks!

  • 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-07T00:11:56+00:00Added an answer on June 7, 2026 at 12:11 am

    Try setting the global “core.sharedRepository=group” just for the clone command:

    git -c "core.sharedRepository=group" clone git@github.com:user/repo.git
    ls -ld repo/.git
    drwxrwsr-x 8 user user 4096 Jul  4 22:16 repo/.git/
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to clone a project from a Git server and then perform
I have a project hosted on GitHub and I would like to work locally
I am new with git. I have a project on git. I would like
I have cloned ~60 git repositories and I would like to update the most
I have a Git repository that contains a bunch of top-level maven projects (each
I would like to access (clone/push/pull) a private (via ssh) git repository while behind
I want to clone a new project with a command like git clone git@some_link.com:some_word/project_name.git
I would like to clone a tag using Javascript (without using any external frameworks
Here is the code .. I would like to clone that code for another
I would like to deep clone a List. for that we are having 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.