Generate SSH key-pair by command ssh-keygen
, and copy the public key to your profile.
In your profile, you could find the SSH Keys
tab, press the Add SSH Key
button then GitLab could identify you (which means you could push/pull code).
P.S.: The Key Deployment in the project settings
only offer a way to read-only access to the repository. To fully access to any repository, public key should be deployed in everyone’s personal settings
.
###2. Git Address
Because our git server is deployed behind the gateway, we need to change the git address to external address:
The GitLab will display the git address as:
git remote add origin [email protected]:Hao/test.git
Then, please change the git address to the following format:
git remote add origin ssh://[email protected]:30011/Hao/test.git
Thus, Pascal’s Mind project will be
git remote add origin ssh://[email protected]:30011/poupartp/mind.git