![]() If you want to use an access token instead of SSH or HTTPS auth for such an existing project, adapt this file the following way. The authentication method of an existing checked out git project is defined in the. This is the crucial piece of information missing in the documentation at this time: You can use the token as the password for the fictional “oauth2” user in CLI commands.įor example, to clone your repository: git clone /yourusername/project.git project Configure the Token for an Existing Repository Create and copy the token and save it at a secure location (ideally, in your password manager). ![]() Read and write access to the repository should be sufficient for many use cases, but you can also pick additional scopes. Navigate to “User Settings” > “Personal Access Tokens” and enter a name and, optionally, an expiration date: However, GitLab does a poor job documenting how you actually use these tokens. It is also the only way to automate repository access when two-factor authentication is enabled. Using these tokens is a secure alternative to storing your GitLab password on a machine that needs access to your repository. For me, the whole point of using that on Windows is to try to keep common gitlab-ci code when you need to build on different platforms. You can get bash on Windows through cygwin, MSYS2 or WSL. GitLab offers to create personal access tokens to authenticate against Git over HTTPS. Bash is a shell supported by gitlab-runner.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |