28 lines
888 B
Markdown
28 lines
888 B
Markdown
For pyrotechny.eu the user account `pyrotechny-eu` and custom SSH key is used. When using git ssh config can override the domain name and use it with different settings. This is needed for enhanced security about traceability. See below:
|
|
|
|
```
|
|
$ mkdir ~/.ssh && chmod 700 ~/.ssh
|
|
$ ssh-keygen -t ecdsa -b 521 -P "" -f $HOME/.ssh/id_ecdsa_pyrotechny_eu
|
|
```
|
|
|
|
`.ssh/config`:
|
|
|
|
```
|
|
Host gh_pyrotechny
|
|
Hostname github.com
|
|
User git
|
|
IdentityFile ~/.ssh/id_ecdsa_pyrotechny_eu
|
|
```
|
|
|
|
`.git/config`:
|
|
|
|
```
|
|
jerry@Jerrys-iMac pyrotechny.eu % git remote -v
|
|
local /Users/jerry/src/github.com/xor-gate/pyrotechny.eu (fetch)
|
|
local /Users/jerry/src/github.com/xor-gate/pyrotechny.eu (push)
|
|
origin gh_pyrotechny:pyrotechny-eu/pyrotechny.eu.git (fetch)
|
|
origin gh_pyrotechny:pyrotechny-eu/pyrotechny.eu.git (push)
|
|
```
|
|
|
|
Rewrite remote:
|
|
`git remote set-url origin "gh_pyrotechny:pyrotechny-eu/pyrotechny.eu.git"` |