I'm new to Git and I have an intranet set up with Gitlab. I have created a Laravel project on a Linux server and have successfully pushed the files to my Gitlab project. However, because the server is not internet facing, the I also have to develop the application on WAMP on my PC, so that Composer can pull the necessary packages I need. My question is - when I pull the application to my PC from Gitlab, how do I set up the SSH side of things? Do I use the same key that I use on the Linux server and, if so, how do I get that registered on my PC?
1 Answers
By your question i understand you want to clone the repository and then get your project started in your system.
There is a simple solution to get started. Before cloning the repository you need following things to be installed and made ready:
Now , you need to go into your git-bash
or any terminal that you use for git
commands and type the following command:
$ ssh-keygen
This generates a new ssh-key for your system, or if you already have one for your system you could use:
$ cat < ~/.ssh/id_rsa.pub
This copies your ssh-key
to your terminal.
Now, you need to open your gitlab account and add the ssh-key to your account.
http://<your-server-ip/domain>/profile/keys
After addition of the ssh-keys to your server you now can clone the repository to your system and use it.
Note :
You cannot use same ssh-key on different gitlab accounts.
To use that you could follow this answer:
Hope this helps you.