I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

Support #1878

Don't create bare GIt repository

Added by James Ang over 12 years ago. Updated over 9 years ago.

Status:
Deferred
Priority:
Normal
Assignee:
Target version:
-
Start date:
21 Oct 2011
Due date:
% Done:

0%

Redmine version:
External issue:

Description

Generally when we cloned a “normal” git repository, the entire folder is under git control and the git information are keep in .git folder within it.

Can SCM be modify such that it create the folder as like a normal git repository?

ProjA
-→ .git
-→ directoryA
-→ directoryB
-→ files

This allows the same folder to be serve from gitweb and use as the actual repository and not just a bare information header.

History

#1 Updated by Andriy Lesyuk over 12 years ago

  • Tracker changed from Feature to Support
  • Status changed from New to Incomplete

I believe you just need to disable options: --bare in scm.yml... Can you confirm?

#2 Updated by James Ang over 12 years ago

Hi,

Yes, without that option it can create the structure but the repository tab cannot find the .git now to fetch the log. It will have a 404 error.

#3 Updated by Andriy Lesyuk over 12 years ago

Hm... Then I’m not sure what can I do. I’m not a Git expert... Do you know what options should be used (if yes you can just add them)? Or maybe some another command should be executed?

#4 Updated by Andriy Lesyuk over 12 years ago

  • Target version deleted (0.3.0)

#5 Updated by Andriy Lesyuk over 12 years ago

New version will support on-creation scripts (see #1870)... Will this resolve the issue for you?

#6 Updated by Andriy Lesyuk over 12 years ago

  • Status changed from Incomplete to Open

Possible workaround:

I think a workaround is to check if the option --bare is passed/configured and modify the string back to Redmine such it it appends a /.git/ if no option is specified in scm.yml.

#7 Updated by Lloyd Philbrook about 12 years ago

This should work as long as they never plan to push to the repository. That is the only real difference between bare vs nonbare repos.

#8 Updated by Alex Chernyy almost 12 years ago

I have some problem. I install plugin
here is my config file

production: auto_create: true
deny_delete: false
svn:
path: /var/svn
svnadmin: /Applications/redmine/subversion/bin/svnadmin
url: svn
chown:
user: 70
group: 70
git:
path: /private/var/git
git: /Applications/redmine/git/bin
url: git
update_server_info: true
git_ext: true
append: .git

Redmine create Git repository locally, but when i try to see on redmine i have error 404

Processing ProjectsController#create (for ::1 at 2012-04-06 18:32:02) [POST]
Parameters: {“commit"⇒“Create”, “action"⇒“create”, “authenticity_token"⇒“v3P6qnocXqp/uG9RCgjzeONxn8b9ABZ4hqMmBJ58k0w=”
Automatically creating reporitory: /private/var/git/hhh.git
Redirected to http://localhost:8080/redmine/projects/hhh/settings
Completed in 449ms (DB: 148) | 302 Found [http://localhost/redmine/projects]

Processing ProjectsController#settings (for ::1 at 2012-04-06 18:32:02) [GET]
Parameters: {“action"⇒“settings”, “id"⇒“hhh”, “controller"⇒“projects”}
Rendering template within layouts/base
Rendering projects/settings
Completed in 342ms (View: 280, DB: 38) | 200 OK [http://localhost/redmine/projects/hhh/settings]

Processing RepositoriesController#show (for ::1 at 2012-04-06 18:32:14) [GET]
Parameters: {“action"⇒“show”, “id"⇒“hhh”, “controller"⇒“repositories”}
Rendering template within layouts/base
Rendering common/error (404)
Completed in 201ms (View: 92, DB: 15) | 404 Not Found [http://localhost/redmine/projects/hhh/repository]

#9 Updated by Andriy Lesyuk almost 12 years ago

  • Status changed from Open to Deferred

Alex Chernyy wrote:

Redmine create Git repository locally, but when i try to see on redmine i have error 404

404 error goes away as soon as you push some files there.

#10 Updated by Andrey Ku over 9 years ago

I can confirm that it is impossible to create NOT bare git repository.

1. When I’m adding repository to redmine i have to point dir that contain git folders (hooks,info,logs and other files like HEAD and so on)

2. If I init bare git repository it creates such folders in current directory by default

From git init man:

--bare
Create a bare repository. If GIT_DIR environment is not set, it is set to the current working directory.

3. If I init NOT bare git repository it creates such folders in ".git” subdirectory:

DESCRIPTION
This command creates an empty Git repository - basically a .git directory with subdirectories for objects, refs/heads, refs/tags, and template files. An initial HEAD file that references the HEAD of the master branch is also created.

Therefore, “SCM Creator” should have different behavior if it creates bare repo or not. It should give different paths to Redmine and Git in case of not bare repo.

Also available in: Atom PDF

Terms of use | Privacy policy