# Git Installation For Developers Steps
- 1. [Add User on server where git-daemon.service is running.](#adding-user)
- 1. Add the user to the git group.
- * It is advised to use same user name for both client and server.
- * It might be possible and desirable that shares a home directory on server, that is restricted just to allow public remote access.
-
- 2. [Create public ssh key for authorized access to the server.](#create-public-key-on-client)
-
-
- 3. [Create /srv/git/some_repository](#create-on-server-global-repository)
- * Change permissions to git group for some_repository.
- 4. git clone /srv/git/some_repository with:
- ```git clone some_user@server:/srv/git/some_repository```
-
-
- 5. [Git add, commit, push from the server if it is an initial new repository.](#git-add--commit)
+- [Git Installation For Developers Steps](#git-installation-for-developers-steps)
+ - [Adding User](#adding-user)
+ - [Add git account first, if not already there](#add-git-account-first-if-not-already-there)
+ - [Adding Without Shell Access Method](#adding-without-shell-access-method)
+ - [Adding With Shell Access as Remote](#adding-with-shell-access-as-remote)
+ - [Create Public Key on Client](#create-public-key-on-client)
+ - [Create On Server Global Repository](#create-on-server-global-repository)
+ - [Git Import From Remote](#git-import-from-remote)
+ - [Git Add \& Commit](#git-add--commit)
+ - [Creating \& Adding Auto-login Authorization keys for the Server.](#creating--adding-auto-login-authorization-keys-for-the-server)
---
### Adding Without Shell Access Method
* These are system type of accounts. That share same home directory which the admin allow can public service access to an shared home.
* Setting to a shared home in /tmp somewhere is not recommended. As on reboot the system might wipe the tmp dir.
-
-```bash
-mkdir /home/dev_share
-chown -R git:git /home/dev_share
-useradd -r -s /bin/false -g git --home /home/dev_share dev_user
-password dev_user
-```
+ * Creating **dev_user** for git access example:
+ ```bash
+ mkdir /home/dev_share
+ chown -R git:git /home/dev_share
+ useradd -r -s /bin/false -g git --home /home/dev_share dev_user
+ password dev_user
+ ```
### Adding With Shell Access as Remote
* This links to remote bash shell if any special to system.
``` git clone /srv/git/PerlCNFWEBServer.git ```
<p style="text-align:right;">
-<a href="#git-installation-for-developers-steps">To Top of Page</a>
+[ <a href="#git-installation-for-developers-steps">To Top of Page</a> ]
</p>
+## Git Import From Remote
+```bash
+git clone git://lifelog.hopto.org/PerlCNFWEBServer
+```
+ - Modify .git/config to enable to git push.
+```
+[core]
+ repositoryformatversion = 0
+ filemode = true
+ bare = false
+ logallrefupdates = true
+[remote "origin"]
+ url = {user_name_on_server_that_is_in_the_git_group}@lifelog.hopto.org:/srv/git/wb-docs
+ fetch = +refs/heads/*:refs/remotes/origin/*
+[branch "master"]
+ remote = origin
+ merge = refs/heads/master
+
+```
+ - {The user_name_on_server_that_is_in_the_git_group} would be for our example **dev_user** created at the beginning of this document.
+<p style="text-align:right;">
+<strong> Jump to </strong> [ <a href="#adding-with-shell-access-as-remote"> Add User</a> ] |
+ [<a href="#git-installation-for-developers-steps"> Top of Page</a> ]
+</p>
## Git Add & Commit
- Check the ```git branch```
- Add directory with ```git add some_dir```
- Git commit to stage ```git commit -m'..some short description...'```
- Finally push to repository ```git push```
+ - You will be asked for password.
+ - Otherwise create an authorization public key on workstation, to be added to the server.
<p style="text-align:right;">
-<a href="#git-installation-for-developers-steps">To Top of Page</a>
+[ <a href="#git-installation-for-developers-steps">To Top of Page</a> ]
</p>
+## Creating & Adding Auto-login Authorization keys for the Server.
+ @TODO
+
---
-<!-- @import "[TOC]" {cmd="toc" depthFrom=1 depthTo=6 orderedList=false} -->
-<!-- code_chunk_output -->
-#### **Table Of Contents**
-- [Git Installation For Developers Steps](#git-installation-for-developers-steps)
- - [Adding User](#adding-user)
- - [Add git account first, if not already there](#add-git-account-first-if-not-already-there)
- - [Adding Without Shell Access Method](#adding-without-shell-access-method)
- - [Adding With Shell Access as Remote](#adding-with-shell-access-as-remote)
- - [Create Public Key on Client](#create-public-key-on-client)
- - [Create On Server Global Repository](#create-on-server-global-repository)
- - [Git Add \& Commit](#git-add--commit)
- - [**Table Of Contents**](#table-of-contents)
+|Doc Attributes|Value|
+|---|---|
+|Doc Author | Will Budić |
+|Doc Origin | [https://lifelog.hopto.org/gitweb/dev_notes/git_installation_with_gitweb.md](https://lifelog.hopto.org/gitweb/?p=dev_notes.git;a=blob;f=configuration_notes/git_installation_with_gitweb.md;h=cf920646c042f75f1bbdcdb304b78e4bde4a3361;hb=HEAD) |
+|Doc Created| 2025-05-15 |
+|Doc Last Updated| 2025-05-15 15:54:41 |
+
+<p style="text-align:right;">
+[ <a href="#git-installation-for-developers-steps">To Top of Page</a> ]
+</p>
-<!-- /code_chunk_output -->
\ No newline at end of file