How To Use OneDev For Repository Mirror

close up photo of programming of codes
Reading Time: 3 minutes

Hello Readers ! In this blog we’ll see that How Use OneDev For Repository Mirror

So let’s get start !!!

Introduction

OneDev

OneDev is an open source all-in-one DevOps platform with the ability to manage git repositories, manage issues, and run continuous integrations.

It is an all-in-one open source DevOps platform that includes issue tracking, Git management, pull request creation, language-based code search and navigation, and several other useful features. Its source code is primarily implemented in Java, with a bit of JavaScript underneath.

Hands-On

Let’s see How To Use OneDev For Repository Mirror step by step:

Step-1: Start the OneDev by running the following command:

docker run --tty --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd)/onedev:/opt/onedev -p 6610:6610 -p 6611:6611 1dev/server

Step-2: Point your browser to http://localhost:6610 to set up OneDev. When you point URL , You will receive a page like this :

Fill all the details to setup Administrator Account for OneDev. After that You will see a page like this :

In system setting page, just use suggested server URL as http://localhost:6610.

Step-3 After that from OneDev projects page, add a project my-app

Once you add the project you will see a window as :

Step-4 Run below command from your terminal to create a react application:

npx create-react-app my-app

Step-5 Change into directory my-app, and run below command to push code to OneDev:

git remote add origin http://localhost:6610/my-app
git push origin master:master

When prompted for authentication, input administrator user name and password specified above.

Step-6 Visit files page of project my-app from OneDev, click link add build spec to bring up the GUI to add build specification. For typical projects, OneDev suggests default job templates like below:

Step-7 Just use the default template, and save the spec. Now you will see that a CI build is running:

Step-8 Yes we have finally done with mirror repository with OneDev.

Conclusion

Hey Folks , In this blog we have learned what is OneDev and how Use OneDev For Repository Mirror with it . Hope you all have learned something interesting . Do let me know in case you face any difficulty.

Keep Learning!!!

Reference

Click Here

knoldus

Written by 

Deeksha Tripathi is a Software Consultant at Knoldus Inc Software. She has a keen interest toward learning new technologies. Her practice area is DevOps. When not working, she will be busy in listening music , and spending time with her family .

Leave a Reply