I spend too much time for testing Create Credential when pull Gitlab private repo. But why when I create many solution type gitlab token not show in dropdown list. how to attach token to gitlab private repo?
When accessing a repository with HTTPS (or HTTP), the git plugin only supports username / password credentials. Other credential types are not supported by the git plugin for HTTP/HTTPS repository access. Create a username / password token with the value of the GitLab token.
When accessing a repository with SSH, the git plugin only supports ssh private key credentials. Other credential types are not supported.
The git client plugin documentation says:
The GitClient interface provides the primary entry points for git access. It supports username / password credentials for git repository access with HTTP and HTTPS protocols (for example,
https://github.com/jenkinsci/git-client-plugin
orhttps://git.example.com/your-repo.git
). It supports private key credentials for git repository access with SSH protocol (for example,git@github.com:jenkinsci/git-client-plugin.git
orssh://git@github.com/jenkinsci/git-client-plugin.git
). Credential support is provided by the Jenkins credentials plugin.