Update 'README.md'
parent
1d73f77335
commit
f58565aa8a
@ -1,3 +1,65 @@
|
|||||||
# scm-setup
|
# scm-setup
|
||||||
|
|
||||||
Source Control Server Preparation
|
***Source Control Server Preparation***
|
||||||
|
|
||||||
|
**Pre-requisite**
|
||||||
|
|
||||||
|
1. ssh client (built-in on Windows 10. Preinstall with Git installation). For windows 7 alternative, try Putty
|
||||||
|
2. [git](https://git-scm.com/)
|
||||||
|
```shell
|
||||||
|
# use windows package manager
|
||||||
|
$ winget install Git.Git
|
||||||
|
```
|
||||||
|
|
||||||
|
3. [TortoiseGit](https://tortoisegit.org/)
|
||||||
|
```shell
|
||||||
|
# use windows package manager
|
||||||
|
$ winget install TortoiseGit.TortoiseGit
|
||||||
|
```
|
||||||
|
|
||||||
|
4. [Tailscale](https://tailscale.com/)
|
||||||
|
```shell
|
||||||
|
# use windows package manager
|
||||||
|
$ winget install tailscale.tailscale
|
||||||
|
```
|
||||||
|
---
|
||||||
|
**Configuration**
|
||||||
|
1. setup sshkey. Run below to generate the private / public key
|
||||||
|
```shell
|
||||||
|
$ ssh-keygen
|
||||||
|
```
|
||||||
|
2. Pass the `c:\users\<username>\.ssh\id_rsa.pub` to administrator to authorise the access to server
|
||||||
|
3. Setup Tailscale. Need remote access to administrator to do first login. Please install [AnyDesk](https://anydesk.com/en) to facilitate remote access
|
||||||
|
4. Setup `c:\Windows\System32\Drivers\etc\hosts` file. Install [PowerToys](https://learn.microsoft.com/en-us/windows/powertoys/). Add the following entry to host file
|
||||||
|
```txt
|
||||||
|
|
||||||
|
127.0.0.1 dev.mitech.com.sg # Test Eng Server
|
||||||
|
|
||||||
|
```
|
||||||
|
5. Setup git profile [configuration](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup)
|
||||||
|
```shell
|
||||||
|
$ git config --global user.name "John Doe"
|
||||||
|
$ git config --global user.email johndoe@example.com
|
||||||
|
|
||||||
|
# setup default branch name as `main`
|
||||||
|
$ git config --global init.defaultBranch main
|
||||||
|
|
||||||
|
# Checking the settings
|
||||||
|
$ git config --list
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
**Accessing the server**
|
||||||
|
1. Establish ssh port forwarding. Open a command prompt. Run below command. The ssh IP address can be found from Tailscale console
|
||||||
|
```shell
|
||||||
|
$ ssh -L 3000:172.16.16.2:3000 -L 222:172.16.16.2:222 mitpenang@100.72.57.125
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Open Chrome. Browse to Source Control Server [Mitech : Gitea](http://dev.mitech.com.sg:3000)
|
||||||
|
3. To clone, use `git ssh://...`
|
||||||
|
|
||||||
|
---
|
||||||
|
**Git**
|
||||||
|
1. [Documentation](https://git-scm.com/doc)
|
||||||
|
2. [GitHub Flow Branching Strategy](https://www.flagship.io/git-branching-strategies/)
|
||||||
|

|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Loading…
Reference in New Issue