Skip to content

Commit 236e676

Browse files
[BB-173] SSH config folder documentation (#191)
* ssh config folder doc * Update docs/user-guide/leverage-cli/private-repositories.md Co-authored-by: Diego OJeda (BinBash) <[email protected]> * wording corrections * mac 12.5 daemon warning * more precise instructions * tf init ssh multiple associated keys --------- Co-authored-by: Diego OJeda (BinBash) <[email protected]>
1 parent dfcfd50 commit 236e676

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

docs/user-guide/leverage-cli/installation.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ To use Leverage CLI you need to install it from the Python Package Index (Pypi).
77
* [x] **Git** `>= 2.25`
88
* [x] **Docker engine** `>= 20.x.y`
99

10+
!!! warning "Docker daemon doesn't seem to be responding"
11+
If you are using Docker Desktop on macOS 12.5 or above, right click on your Docker Desktop task bar icon,
12+
then “Settings …“, under “General” , make sure to choose osxfs (legacy) as your file sharing implementation.
13+
1014
###Install Pip
1115

1216
=== "Ubuntu/Debian"

docs/user-guide/leverage-cli/private-repositories.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,16 @@ $ eval "$(ssh-agent -s)"
3131
$ ssh-add ~/.ssh/<private_ssh_key_file>
3232
```
3333
(replace `private_ssh_key_file` with the desired file, the process can request the passphrase if it was set on key creation step)
34+
35+
## Using the SSH config file to specify the key that must be used for a given host
36+
37+
The ssh-agent socket is not always available in all the OS, like in Mac. So now our `leverage terraform init` command copies the ssh config file (and the whole .ssh directory) into the container volume, which means any custom configuration you have there,
38+
will be used. You can read more on the [ssh official documentation](https://www.ssh.com/academy/ssh/config).
39+
40+
If, for example, you need to use a custom key for your private repositories on gitlab, you could add a block to your `ssh config` file, specifying:
41+
42+
```
43+
host gitlab.com
44+
HostName gitlab.com
45+
IdentityFile ~/.ssh/my_gitlab_key
46+
```

docs/user-guide/troubleshooting/general.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,14 @@ They are stored in 2 files: `config` and `credentials`.
2727
By default, the AWS CLI will create those files under this path: `~/.aws/` but Leverage uses a slightly different convention, so they should actually be located in this path: `~/.aws/[project_name_here]/`.
2828

2929
So, for instance, if your project name is `acme`, then said files should be found under: `~/.aws/acme/config` and `~/.aws/acme/credentials`.
30+
31+
## SSH reiterative confirmation
32+
33+
If you get a reiterative dialog for confirmation while running a `leverage terraform init` :
34+
```
35+
Warning: the ECDSA host key for 'YYY' differs from the key for the IP address 'ZZZ.ZZZ.ZZZ.ZZZ'
36+
Offending key for IP in /root/.ssh/known_hosts:xyz
37+
Matching host key in /root/.ssh/known_hosts:xyw
38+
Are you sure you want to continue connecting (yes/no)?
39+
```
40+
You may have more than 1 key associated to the `YYY` host. Remove the old or incorrect one, and the dialog should stop.

0 commit comments

Comments
 (0)