-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(DEVELOPER.md): fix the guide of authentication (#13489)
- Loading branch information
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,6 +160,23 @@ An alternative is to edit the `~/.cargo/config` file and add the following lines | |
git-fetch-with-cli = true | ||
``` | ||
|
||
You also have to make sure the `git` CLI is using the proper protocol to fetch the dependencies | ||
if you are authenticated with | ||
[Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token). | ||
|
||
```shell | ||
# If you are using the HTTPS protocol to clone the repository | ||
# YOU ONLY NEED TO DO THIS ONLY ONCE FOR THIS DIRECTORY | ||
git config --local url."https://${GITHUB_TOKEN}@github.com/".insteadOf '[email protected]:' | ||
git config --local url."https://${GITHUB_TOKEN}@github.com".insteadOf 'https://github.com' | ||
|
||
|
||
# If you are using the SSH protocol to clone the repository | ||
# YOU ONLY NEED TO DO THIS ONLY ONCE FOR THIS DIRECTORY | ||
git config --local url.'[email protected]:'.insteadOf 'https://github.com' | ||
git config --local url.'ssh://[email protected]/'.insteadOf 'https://github.com/' | ||
``` | ||
|
||
Finally, we start the build process: | ||
|
||
``` | ||
|