GitLab - ghdrako/doc_snipets GitHub Wiki

Mirroring

Premium

Verify connection after add keys to gitlab

ssh -T [email protected] # shoud see “Welcome to GitLab, @username!” message
ssh -Tvvv [email protected]  # to debug problems

Using Different Keys for Different Repositories

git config core.sshCommand "ssh -o IdentitiesOnly=Yes -i ~/.ssh/private-key-filename-for-this-repository -F/dev/null"

Using Different Accounts on a Single GitLab Instance


Refreshing Fork

https://forum.gitlab.com/t/refreshing-a-fork/32469

GitLab Repository Mirror Navigate into Settings > Repository > Mirroring repositories.

Remove protecting on branche

Go to project: "Settings" → "Repository" → scroll down to "Protected branches".

And add to Allwed to push

API for GitLab

Problem with PUSH

remote: GitLab: Author '[email protected]' is not a member of team
To code.pkobp.pl:user/anthos-configs-new.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'code.bank.pl:user/anthos-configs-new.git

W Gtlab na projekcie do którego jest proba push-a Settings->Repository->Push Rules Uncheck Check whether the commit author is a GitLab user and click button Save Push Rules