Skip to content

Commit 28b0b1d

Browse files
authored
docs(DEVELOPER.md): fix the guide of authentication (#13489)
1 parent 12e2481 commit 28b0b1d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

DEVELOPER.md

+17
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,23 @@ An alternative is to edit the `~/.cargo/config` file and add the following lines
160160
git-fetch-with-cli = true
161161
```
162162

163+
You also have to make sure the `git` CLI is using the proper protocol to fetch the dependencies
164+
if you are authenticated with
165+
[Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).
166+
167+
```shell
168+
# If you are using the HTTPS protocol to clone the repository
169+
# YOU ONLY NEED TO DO THIS ONLY ONCE FOR THIS DIRECTORY
170+
git config --local url."https://${GITHUB_TOKEN}@github.com/".insteadOf '[email protected]:'
171+
git config --local url."https://${GITHUB_TOKEN}@github.com".insteadOf 'https://github.com'
172+
173+
174+
# If you are using the SSH protocol to clone the repository
175+
# YOU ONLY NEED TO DO THIS ONLY ONCE FOR THIS DIRECTORY
176+
git config --local url.'[email protected]:'.insteadOf 'https://github.com'
177+
git config --local url.'ssh://[email protected]/'.insteadOf 'https://github.com/'
178+
```
179+
163180
Finally, we start the build process:
164181

165182
```

0 commit comments

Comments
 (0)