You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gitbox is a docker image that combines a preconfigured [git] (https://git-scm.com) server utilizing the git [smart-http] (https://git-scm.com/book/en/v2/Git-on-the-Server-Smart-HTTP) service for repository access. This is complemented by an installation of [gitlist] (https://github.com/klaussilveira/gitlist). Git smart-http and gitlist are served via [nginx] (http://nginx.org).
3
+
Gitbox is a docker image that combines a preconfigured [git] (https://git-scm.com) server utilizing the git [smart-http] (https://git-scm.com/book/en/v2/Git-on-the-Server-Smart-HTTP) service for repository access. This is complemented by an installation of [gitlist] (https://github.com/klaussilveira/gitlist). Git smart-http and gitlist are served via [nginx] (http://nginx.org).
4
4
5
5
Installation:
6
6
-------------
7
7
8
-
Gitbox requires docker to be installed and operational. You can then either download this image from [hub.docker.com] (https://hub.docker.com/r/nmarus/docker-gitbox/), or clone this repository from [github.com] (https://github.com) and build the image locally.
8
+
Gitbox requires docker to be installed and operational. You can then either download this image from [hub.docker.com] (https://hub.docker.com/r/nmarus/docker-gitbox/), or clone this repository from [github.com] (https://github.com) and build the image locally.
9
9
10
10
The [master branch] (https://github.com/nmarus/docker-gitbox) is where all development is done. The [stable branch] (https://github.com/nmarus/docker-gitbox/tree/stable) is where all feature testing has been completed. The [hub.docker.com] (https://hub.docker.com/r/nmarus/docker-gitbox/) repository is built from the stable branch. Review the [README.md] (https://github.com/nmarus/docker-gitbox/blob/stable/README.md) for the stable branch as it is often quite different than that of the master branch. The master branch is in flux and features are constantly being tweaked and added.
11
11
12
12
**To install and run from the hub.docker.com image repository:**
13
13
14
14
From your docker host (or remote docker client):
15
15
16
-
docker run -d -it --name gitbox \
17
-
-h <container_fqdn> \
18
-
-e FQDN=<container_fqdn> \
19
-
-p 80:80 \
20
-
-v /srv/gitbox/repos:/repos \
21
-
-v /srv/gitbox/ng-auth:/ng-auth \
22
-
nmarus/gitbox
23
-
16
+
docker run -d -it --name gitbox \
17
+
-h <container_fqdn> \
18
+
-e FQDN=<container_fqdn> \
19
+
-p 80:80 \
20
+
-v /srv/gitbox/repos:/repos \
21
+
-v /srv/gitbox/ng-auth:/ng-auth \
22
+
nmarus/gitbox
23
+
24
24
**To install and run from this from the github source repository:**
git remote add origin http://<docker host ip or hostname>/git/myrepo.git
108
-
touch README.md
109
-
echo "##This is a README.md file.##" > README.md
110
-
git add -A
111
-
git commit -m "This is my initial commit."
112
-
git push --set-upstream origin master
103
+
mkdir myrepo
104
+
cd myrepo
105
+
git init
106
+
git remote add origin http://<docker host ip or hostname>/git/myrepo.git
107
+
touch README.md
108
+
echo "##This is a README.md file.##" > README.md
109
+
git add -A
110
+
git commit -m "This is my initial commit."
111
+
git push --set-upstream origin master
113
112
114
113
*Note 1: This process will require authentication to the nginx web server on clone, pull, or push. See Authentication.*
115
114
116
115
*Note 2: This reuires you at least add one file, commit that file and push it using the last 3 commands. Not doing do will cause git push and git pull to fail.*
117
116
118
117
**Gitlist Browser Access:**
119
118
120
-
You can access git box using an internet browser at the url:
119
+
You can access git box using an internet browser at the url:
121
120
122
-
http://<docker host ip or hostname>
121
+
http://<docker host ip or hostname>
123
122
124
123
*Note: This example assumes you are running gitbox using the default docker mappings defined above. If not, adjust accordingly. If your repository's directory is empty, this url presents a blank page...*
125
124
126
125
**Git HTTP Access:**
127
126
128
127
From your git client cli:
129
128
130
-
git clone http://<docker host ip or hostname>/git/myrepo.git
129
+
git clone http://<docker host ip or hostname>/git/myrepo.git
131
130
132
131
*Note 1: There is a slightly different url used in retrieving the git repository in this method. This process will require authentication to the http server on clone, pull, or push. See Authentication.*
133
132
134
133
Authentication:
135
134
---------------
136
-
The authentication method and interaction with git and gitlist is still a work in progress. That being said, some authentication is in place through modifications of the nginx htpasswd file. This authentication applies to read and write access via the git smart-http protocol and view access to the gitlist web interface. The htpasswd file is stored in the "/ng-auth" volume and the start.sh script looks for the htpasswd file in this directory on startup. It will only regenerate the htpasswd file when it is not found.
135
+
The authentication method and interaction with git and gitlist is still a work in progress. That being said, some authentication is in place through modifications of the nginx htpasswd file. This authentication applies to read and write access via the git smart-http protocol and view access to the gitlist web interface. The htpasswd file is stored in the "/ng-auth" volume and the start.sh script looks for the htpasswd file in this directory on startup. It will only regenerate the htpasswd file when it is not found.
137
136
138
137
**To grab the initial gitadmin password:**
139
138
140
139
When the container is built, a random password is generated for the admin account. This account is specified in the Dockerfile. To obtain the initial password run the following command from your docker host (or remote docker client):
141
140
142
-
docker exec gitbox cat /ng-auth/gitadmin.password
141
+
docker exec gitbox cat /ng-auth/gitadmin.password
143
142
144
143
*Note: This file will delete itself as soon as you add your first user (or reset the admin password) using the steps below.*
0 commit comments