Skip to content

Commit 33afeca

Browse files
committed
Remote development
1 parent e8d0925 commit 33afeca

File tree

1 file changed

+44
-5
lines changed

1 file changed

+44
-5
lines changed

ydb/docs/en/core/development/suggest-change.md

+44-5
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,32 @@ You need to have a GitHub account to suggest any changes to the YDB source code.
1010

1111
### SSH key pair {#ssh_key_pair}
1212

13-
Create an SSH key pair and register the public key at your GitHub account settings to be authenticated at GitHub when running commands from a command line on your development machine.
13+
* In general to connect to github you can use: ssh/token/ssh from yubikey/password etc. Recommended method is ssh keys.
14+
* If you don't have already created keys (or yubikey), then just create new keys. Full instructions are on [this GitHub page](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key).
15+
* If you have a yubikey, you can use the legacy key from the yubikey:
16+
* Let's assume you have already configured yubikey (or configure yubikey locally)
17+
* On your laptop: `skotty ssh keys`
18+
* Upload `legacy@yubikey` ssh key to github (over ui: https://github.com/settings/keys)
19+
* test connection on laptop: `ssh -T [email protected]`
1420

15-
Full instructions are on [this GitHub page](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key).
21+
#### Remote development
22+
If you are developing on a remote dev host you can use the key from your laptop (generated keys or keys from yubikey). You need to configure key forwarding. (Full instructions are on [this GitHub page](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/using-ssh-agent-forwarding) ).
23+
24+
Suppose your remote machine is dev123456.search.yandex.net.
25+
26+
* on your laptop add ssh forwarding (`~/.ssh/config`):
27+
```
28+
Host dev123456.search.yandex.net
29+
ForwardAgent yes
30+
```
31+
* on remote dev host add to `~/.bashrc`:
32+
```
33+
if [[ -S "$SSH_AUTH_SOCK" && ! -h "$SSH_AUTH_SOCK" ]]; then
34+
ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock;
35+
fi
36+
export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock;
37+
```
38+
* test connection: `ssh -T [email protected]`
1639

1740
### Git CLI {#git_cli}
1841

@@ -36,7 +59,7 @@ sudo apt-get update
3659
sudo apt-get install libidn11-dev libaio-dev libc6-dev
3760
```
3861

39-
### GitHub CLI {#gh_cli}
62+
### GitHub CLI (optional) {#gh_cli}
4063

4164
Using GitHub CLI enables you to create Pull Requests and manage repositories from a command line. You can also use GitHub UI for such actions.
4265

@@ -75,18 +98,34 @@ And copy-paste the shown token to complete the GitHub CLI configuration.
7598

7699
YDB official repository is [https://github.com/ydb-platform/ydb](https://github.com/ydb-platform/ydb), located under the YDB organization account `ydb-platform`.
77100

78-
To work on the YDB code changes, you need to create a fork repository under your GitHub account, and clone it locally. There's a single GitHub CLI command which does all of that together:
79-
101+
Create working dir:
80102
```
81103
mkdir -p ~/ydbwork
82104
cd ~/ydbwork
83105
```
106+
107+
To work on the YDB code changes, you need to create a fork repository under your GitHub account, and clone it locally.
108+
109+
{% list tabs %}
110+
111+
- GitHub CLI:
112+
113+
There's a single GitHub CLI command which does all of that together:
114+
84115
```
85116
gh repo fork ydb-platform/ydb --default-branch-only --clone
86117
```
87118

88119
Once completed, you have a YDB Git repository fork cloned to `~/ydbwork/ydb`.
89120

121+
- git
122+
123+
On https://github.com/ydb-platform/ydb press Fork (Fork your own copy of ydb-platform/ydb).
124+
```
125+
git clone [email protected]:{your_name}/ydb.git
126+
```
127+
{% endlist %}
128+
90129
Forking a repository is an instant action, however cloning to the local machine takes some time to transfer about 650 MB of repository data over the network.
91130

92131
### Configure commit authorship {#author}

0 commit comments

Comments
 (0)