Let’s create a blank project
Figure 9: Create a New Project
Call the project Network Automation
|
Click internal for a visibility level and uncheck Initialize repository with a README
|
Check Internal
Uncheck Initialize repository with a README
Click Save
Figure 10: Create Network Automation Project
Under the Push to an Existing Folder section
Copy the following command to your clipboard (but don’t yet run the command):
git remote add origin http://server2/knorton/network-automation.git (1)
1 |
Your FQDN in the URL will be different than the one above |
Go back to the server terminals and Visual Studio Code IDE on you workstation
In all the locations where you have downloaded the repository
We need disassociate our cloned repository and point it to your new Gitlab-CE server.
|
You only need to run the git push origin main from one location
|
Enter the following commands like the picture below shows
cloud_user@ed26757f4b2c:~/network-automation$ git remote -v
origin https://github.com/knorton3/network-automation.git (fetch)
origin https://github.com/knorton3/network-automation.git (push)
cloud_user@ed26757f4b2c:~/network-automation$ git remote remove origin (1)
cloud_user@ed26757f4b2c:~/network-automation$ git remote add origin http://server2/knorton/network-automation.git (2)
cloud_user@ed26757f4b2c:~/network-automation$ git push origin master
Username for 'http://server2': knorton (3)
Password for 'http://knorton@server2': (4)
Enumerating objects: 273, done.
Counting objects: 100% (273/273), done.
Delta compression using up to 2 threads
Compressing objects: 100% (168/168), done.
Writing objects: 100% (273/273), 391.62 MiB | 10.65 MiB/s, done.
Total 273 (delta 119), reused 209 (delta 87)
remote: Resolving deltas: 100% (119/119), done.
To http://server2/knorton/network-automation.git
* [new branch] master -> master
1 |
Removing the original origin |
2 |
Your FQDN in the URL will be different than the one above |
3 |
When prompted for the Username. Use the newly created user you just made. |
4 |
When prompted for the Password. Use the newly created user you just made. |
Hit refresh on your browser pointing to your GitLab Server and notice all the files from the original repository are now there
Figure 12: Network Automation Repository