I am able to create a repository via REST API but now I need to add a secondary remote to the repository, specifically a remote to a gitlab repository.
What I usually do from command line is:git remote add secondremote git@gitlab.com:path/to-gitlab-repo.git
I can't figure out how or if it is possible to achieve the same result with REST API.
That git command only affects your local copy of the repo. What are you trying to do with the REST API?
Hi James, I'd like to know if exists an API to achieve the same result of the git command "git remote add..." without the needs to checkout a copy of the repo.
I mean something like POST "/repository/{slug}/remote" in order to add a remote only by API.
Thanks
Gianluigi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What are you trying to achieve with that? Are you trying to have all clones of the repo use the same set of remotes?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My need is to create a repo via API, and this is ok, and then add to this repo a remote pointing to a repo from Gitlab.
This because my project needs to update source code from the repo from gitlab and add some other code which will not be shared to the repo from gitlab.
I don't know exactly but i think it's like to have a fork of the repo from gitlab.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.