Re: [rancid] Howto setup Rancid with Git on Debian?
In my environment, we did it slightly differently. My environment was this: /var/rancid/rancid is a working local git checkout /var/rancid/git/rancid is the local git 'master' /var/rancid/git/rancid/hooks/post-receive has what you're looking for: user@host# cat post-receive #!/bin/bash # - # keep remote git copy up to date # - /usr/bin/git push -u To make that work, you must run this command to add the remote: git remote add Docs for the remote add are at https://help.github.com/articles/adding-a-remote/. --Chris Chris Gauthier Senior Network Engineer | comScore, Inc. t +1 (503) 331-2704 | cgauth...@comscore.com 317 SW Alder Street, Suite 700 | Portland, OR 97204 United States comscore.com This e-mail (including any attachments) may contain information that is private, confidential, or protected by attorney-client or other privilege. If you received this e-mail in error, please delete it from your system and notify sender. -Original Message- From: heasleyDate: Thursday, January 11, 2018 at 9:53 AM To: "Gauthier, Chris" Cc: "rancid-discuss@shrubbery.net" Subject: Re: [rancid] Howto setup Rancid with Git on Debian? Thu, Jan 11, 2018 at 03:20:20PM +, Gauthier, Chris: > As for the Git part, rancid uses a local git server that it creates the > folder structure for. Each rancid group is its gets own Git repo. The key > is really the rancid config file. Set RCSSYS=”git” and it will do the heavy > lifting. If you need the stuff to go to a remote repo, then you will need to > make the local Git do blind commits to the remote repo. That’s something one > of my server admins took care of, so I’m not sure exactly how he did it. Add a remote to a given rancid group: https://help.github.com/articles/adding-a-remote/ add to the rancid-run cronjob, a 'git push newremote' cd ~rancid/group git remote add foo giturl ... rancid-run; cd ~rancid/group; git push foo add a second push destination (remote should not require auth) to origin and rancid will push to it each run. cd ~rancid/group git remote add foo giturl git remote set-url --add --push origin `git remote get-url --push origin` git remote set-url --add --push origin `git remote get-url --push foo` ___ Rancid-discuss mailing list Rancid-discuss@shrubbery.net http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: [rancid] Howto setup Rancid with Git on Debian?
Thu, Jan 11, 2018 at 03:20:20PM +, Gauthier, Chris: > As for the Git part, rancid uses a local git server that it creates the > folder structure for. Each rancid group is its gets own Git repo. The key > is really the rancid config file. Set RCSSYS=”git” and it will do the heavy > lifting. If you need the stuff to go to a remote repo, then you will need to > make the local Git do blind commits to the remote repo. That’s something one > of my server admins took care of, so I’m not sure exactly how he did it. Add a remote to a given rancid group: https://help.github.com/articles/adding-a-remote/ add to the rancid-run cronjob, a 'git push newremote' cd ~rancid/group git remote add foo giturl ... rancid-run; cd ~rancid/group; git push foo add a second push destination (remote should not require auth) to origin and rancid will push to it each run. cd ~rancid/group git remote add foo giturl git remote set-url --add --push origin `git remote get-url --push origin` git remote set-url --add --push origin `git remote get-url --push foo` ___ Rancid-discuss mailing list Rancid-discuss@shrubbery.net http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: [rancid] Howto setup Rancid with Git on Debian?
Whether its Debian or another distro, the basic setup is still the same. I did the same thing on CentOS. V3.6.2 has a bug when running the configure script. Check out: http://www.shrubbery.net/pipermail/rancid-discuss/2017-July/009735.html As for the Git part, rancid uses a local git server that it creates the folder structure for. Each rancid group is its gets own Git repo. The key is really the rancid config file. Set RCSSYS=”git” and it will do the heavy lifting. If you need the stuff to go to a remote repo, then you will need to make the local Git do blind commits to the remote repo. That’s something one of my server admins took care of, so I’m not sure exactly how he did it. Chris Chris Gauthier Senior Network Engineer | comScore, Inc. t +1 (503) 331-2704 | cgauth...@comscore.com 317 SW Alder Street, Suite 700 | Portland, OR 97204 United States comscore.com This e-mail (including any attachments) may contain information that is private, confidential, or protected by attorney-client or other privilege. If you received this e-mail in error, please delete it from your system and notify sender. -Original Message- From: Rancid-discusson behalf of shouldbe q931 Date: Thursday, January 11, 2018 at 4:46 AM To: ACS Solutions Network Cc: "rancid-discuss@shrubbery.net" Subject: Re: [rancid] Howto setup Rancid with Git on Debian? On Thu, Jan 11, 2018 at 11:02 AM, ACS Solutions Network wrote: > Hello folks, > > > > i’ve searched the web, this list, contents in the package etc. but didn’t > find any up to date information on how to setup Rancid with Git on Debian. > > > > I’ve installed rancid via apt-get (rancid ver. 3.6.2-2) on Debian 9. Git is > ver. 2.11. > <10 seconds with google found https://www.cryptomonkeys.com/2016/11/rancid-git/ http://opennodecloud.com/howto/2014/05/08/howto-about-rancid.html I do not know if the Debian packaged 3.6.2 includes git support. Cheers ___ Rancid-discuss mailing list Rancid-discuss@shrubbery.net http://www.shrubbery.net/mailman/listinfo/rancid-discuss ___ Rancid-discuss mailing list Rancid-discuss@shrubbery.net http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: [rancid] Howto setup Rancid with Git on Debian?
Thu, Jan 11, 2018 at 12:37:54PM +, shouldbe q931: > On Thu, Jan 11, 2018 at 11:02 AM, ACS Solutions Network >wrote: > > Hello folks, > > > > > > > > i’ve searched the web, this list, contents in the package etc. but didn’t > > find any up to date information on how to setup Rancid with Git on Debian. > > > > > > > > I’ve installed rancid via apt-get (rancid ver. 3.6.2-2) on Debian 9. Git is > > ver. 2.11. > > > > <10 seconds with google found > > https://www.cryptomonkeys.com/2016/11/rancid-git/ > http://opennodecloud.com/howto/2014/05/08/howto-about-rancid.html > > I do not know if the Debian packaged 3.6.2 includes git support. I'd recommend using 3.7 for git. A minor fix for git, but will make it easier, IMO. ___ Rancid-discuss mailing list Rancid-discuss@shrubbery.net http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: [rancid] Howto setup Rancid with Git on Debian?
On Thu, Jan 11, 2018 at 11:02 AM, ACS Solutions Networkwrote: > Hello folks, > > > > i’ve searched the web, this list, contents in the package etc. but didn’t > find any up to date information on how to setup Rancid with Git on Debian. > > > > I’ve installed rancid via apt-get (rancid ver. 3.6.2-2) on Debian 9. Git is > ver. 2.11. > <10 seconds with google found https://www.cryptomonkeys.com/2016/11/rancid-git/ http://opennodecloud.com/howto/2014/05/08/howto-about-rancid.html I do not know if the Debian packaged 3.6.2 includes git support. Cheers ___ Rancid-discuss mailing list Rancid-discuss@shrubbery.net http://www.shrubbery.net/mailman/listinfo/rancid-discuss
[rancid] Howto setup Rancid with Git on Debian?
Hello folks, i've searched the web, this list, contents in the package etc. but didn't find any up to date information on how to setup Rancid with Git on Debian. I've installed rancid via apt-get (rancid ver. 3.6.2-2) on Debian 9. Git is ver. 2.11. Any information on this would be appreciated! Thanks in advance. ___ Rancid-discuss mailing list Rancid-discuss@shrubbery.net http://www.shrubbery.net/mailman/listinfo/rancid-discuss