It is not clear from the API how to get a token that can be used to clone http repositories.
From the documentation here:
http://doc.gitlab.com/ee/ci/api/README.html
It should be possible to GET this URL:
http://gitlab.com/ci/api/v1/projects?private_token=QVy1PB7sTxfy4pqfZM1U&url=http://demo.gitlab.com/
I'm not sure where the parameter comes from, urlbut even with my personal token, it gets a 404 error page.
I tried with a subdomain cibut it just redirected me to gitlab.com.
However, I will explain a little more reasons why I need it. I have a server that can have multiple projects. Each project will contain a list of private / public repositories, each project must be cloned / extracted, etc. Regularly. Unlike github, gitlab does not provide the oauth2 token that is nearby, and instead provides a CI token for each project. I could make sure that the user enters a token for each project, but this is much more complicated than entering a personal token.
On the other hand, I could generate SSH keys for each user and add the public key to their account, and in this way I could get / clone using ssh instead of http. But this is a bit more work on my part than just getting the token and cloning with the main authentication URL.
git clone https://gitlab-ci-token:token@gitlab.com/project.git
source
share