Selaa lähdekoodia

Update libraries.md

Björn Ritzl 1 vuosi sitten
vanhempi
commit
b3bb58cb19
1 muutettua tiedostoa jossa 16 lisäystä ja 6 poistoa
  1. 16 6
      docs/en/manuals/libraries.md

+ 16 - 6
docs/en/manuals/libraries.md

@@ -31,7 +31,6 @@ Libraries are referred to via a standard URL. For a project hosted on GitHub it
 It is recommend to always depend on a specific release of a library project instead of on the master branch. This way it is up to you as a developer to decide when to incorporate changes from a library project as opposed to always getting the latest (and potentially breaking) changes from the master branch of a library project.
 :::
 
-
 ### Basic access authentication
 
 It is possible to add a username and password/token to the library URL to perform basic access authentication when using libraries that are not publicly available:
@@ -40,11 +39,7 @@ It is possible to add a username and password/token to the library URL to perfor
 https://username:[email protected]/defold/private/archive/main.zip
 ```
 
-The `username` and `password` fields will be extracted and added as an `Authorization` request header. This works for any server which supports basic access authorization. It can also be used to fetch libraries from private repositories hosted on GitHub. In the case of GitHub you need to [generate a personal access token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) and use that as your password.
-
-```
-https://github-username:[email protected]/defold/private/archive/main.zip
-```
+The `username` and `password` fields will be extracted and added as an `Authorization` request header. This works for any server which supports basic access authorization.
 
 ::: important
 Make sure to not share or accidentally leak your generated personal access token or password as it can have dire consequences if they fall into the wrong hands!
@@ -58,6 +53,21 @@ https://__PRIVATE_USERNAME__:[email protected]/defold/private/archive
 
 In the above example the username and token will be read from the system environment variables `PRIVATE_USERNAME` and `PRIVATE_TOKEN`.
 
+#### GitHub authentication
+
+To fetch from a private repository on GitHub you need to [generate a personal access token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) and use that as your password.
+
+```
+https://github-username:[email protected]/defold/private/archive/main.zip
+```
+
+#### GitLab authentication
+
+To fetch from a private repository on GitLab you need to [generate a personal access token](https://docs.gitlab.com/ee/security/token_overview.html) and send as a URL parameter.
+
+```
+https://gitlab.com/defold/private/-/archive/main/test-main.zip?private=personal-access-token
+```
 
 ### Advanced access authentication