Virtual host in Apache set to git-http-backend - error in Apache log, not the Git virtual host but the default server log.
fatal: Not a git repository (or any of the parent directories): .git
Previously I did an init @ /srv/repos/git/ by "git init --bare --shared wordpress.git"
If I do a git status when not in the wordpress.git folder, same error.
If in wordpress.git path I get fatal: This operation must be run in a work tree
Bare = no work tree (dummy!)
Then
cd /srv/repos/git/wordpress.git git config --bool core.bare false git config --path core.worktree /srv/repos/git/wordpress.git
Added new files
git add .
git commit
Now git show:
root@www git/wordpress.git# git show commit 1b943b961f2f7907dac334f50a58d03e51531780 Author: root <root@www.inteltech.com> Date: Tue Feb 3 17:49:28 2015 -0500 Initial commit of blank repository wordpress.git diff --git a/HEAD b/HEAD new file mode 100644 index 0000000..cb089cd --- /dev/null +++ b/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/config b/config new file mode 100644 index 0000000..86a67d8 --- /dev/null +++ b/config @@ -0,0 +1,8 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + sharedrepository = 1 + worktree = /srv/repos/git/wordpress.git/ +[receive] + denyNonFastforwards = true diff --git a/description b/description new file mode 100644 index 0000000..498b267 --- /dev/null +++ b/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/gitweb/apache2.conf b/gitweb/apache2.conf new file mode 100644 index 0000000..510ff5a --- /dev/null +++ b/gitweb/apache2.conf @@ -0,0 +1,20 @@ +ServerName "git-instaweb" +ServerRoot "/usr/share/gitweb" +DocumentRoot "/usr/share/gitweb" +ErrorLog "/srv/repos/git/wordpress.git/gitweb/apache2/error.log" +CustomLog "/srv/repos/git/wordpress.git/gitweb/apache2/access.log" combined +PidFile "/srv/repos/git/wordpress.git/pid" +Listen 12399 +LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so +LoadModule dir_module /usr/lib/apache2/modules/mod_dir.so +LoadModule env_module /usr/lib/apache2/modules/mod_env.so +TypesConfig "/srv/repos/git/wordpress.git/mime.types" +DirectoryIndex gitweb.cgi +LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so +PassEnv GIT_DIR +PassEnv GIT_EXEC_PATH +PassEnv GITWEB_CONFIG +AddHandler cgi-script .cgi +<Location /gitweb.cgi> + Options +ExecCGI +</Location> diff --git a/gitweb/apache2/access.log b/gitweb/apache2/access.log new file mode 100644 index 0000000..e69de29 diff --git a/gitweb/apache2/error.log b/gitweb/apache2/error.log new file mode 100644 index 0000000..4b7219d --- /dev/null +++ b/gitweb/apache2/error.log
More information about text formats
Update - close but not their yet
Virtual host in Apache set to git-http-backend - error in Apache log, not the Git virtual host but the default server log.
fatal: Not a git repository (or any of the parent directories): .git
Previously I did an init @ /srv/repos/git/ by "git init --bare --shared wordpress.git"
If I do a git status when not in the wordpress.git folder, same error.
If in wordpress.git path I get fatal: This operation must be run in a work tree
Bare = no work tree (dummy!)
Then
cd /srv/repos/git/wordpress.git
git config --bool core.bare false
git config --path core.worktree /srv/repos/git/wordpress.git
Added new files
git add .
git commit
Now git show:
root@www git/wordpress.git# git show
commit 1b943b961f2f7907dac334f50a58d03e51531780
Author: root <root@www.inteltech.com>
Date: Tue Feb 3 17:49:28 2015 -0500
Initial commit of blank repository wordpress.git
diff --git a/HEAD b/HEAD
new file mode 100644
index 0000000..cb089cd
--- /dev/null
+++ b/HEAD
@@ -0,0 +1 @@
+ref: refs/heads/master
diff --git a/config b/config
new file mode 100644
index 0000000..86a67d8
--- /dev/null
+++ b/config
@@ -0,0 +1,8 @@
+[core]
+ repositoryformatversion = 0
+ filemode = true
+ bare = false
+ sharedrepository = 1
+ worktree = /srv/repos/git/wordpress.git/
+[receive]
+ denyNonFastforwards = true
diff --git a/description b/description
new file mode 100644
index 0000000..498b267
--- /dev/null
+++ b/description
@@ -0,0 +1 @@
+Unnamed repository; edit this file 'description' to name the repository.
diff --git a/gitweb/apache2.conf b/gitweb/apache2.conf
new file mode 100644
index 0000000..510ff5a
--- /dev/null
+++ b/gitweb/apache2.conf
@@ -0,0 +1,20 @@
+ServerName "git-instaweb"
+ServerRoot "/usr/share/gitweb"
+DocumentRoot "/usr/share/gitweb"
+ErrorLog "/srv/repos/git/wordpress.git/gitweb/apache2/error.log"
+CustomLog "/srv/repos/git/wordpress.git/gitweb/apache2/access.log" combined
+PidFile "/srv/repos/git/wordpress.git/pid"
+Listen 12399
+LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so
+LoadModule dir_module /usr/lib/apache2/modules/mod_dir.so
+LoadModule env_module /usr/lib/apache2/modules/mod_env.so
+TypesConfig "/srv/repos/git/wordpress.git/mime.types"
+DirectoryIndex gitweb.cgi
+LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so
+PassEnv GIT_DIR
+PassEnv GIT_EXEC_PATH
+PassEnv GITWEB_CONFIG
+AddHandler cgi-script .cgi
+<Location /gitweb.cgi>
+ Options +ExecCGI
+</Location>
diff --git a/gitweb/apache2/access.log b/gitweb/apache2/access.log
new file mode 100644
index 0000000..e69de29
diff --git a/gitweb/apache2/error.log b/gitweb/apache2/error.log
new file mode 100644
index 0000000..4b7219d
--- /dev/null
+++ b/gitweb/apache2/error.log