I am trying to push a branch into a gitlab remote repository and an example of the behaviour would be:
git clone http://(path to branch)
Cloning into 'origin'...
fatal: unable to update url base from redirection:
asked for: http://(path to branch)/info/refs?service=git-upload-pack
redirect: http://(path to root)/users/sign_in
please note the changes on the urls and also I entered my credentials in .git/config, as presented below
[user]
name = myname
pwd = mypassword
password = mypassword
It's probably relevant that when I signed up, the repository asked for a public key that I had to make exclusively for the project.
Try cloning the repository with no path to branch first, then checkout to the branch you want.
git clone git@(domain and path to the repository)
See details here. I'd recommend just setting up SSH access only takes a few minutes and much easier once it's running.
Next, just cd into the project you made and run
git branch -a
to view all project branches. Finally
git checkout [branchname]
should switch you to the branch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With