[rancid] Help Using git with RANCID
Vacheslav
m_zouhairy at skno.by
Thu Aug 23 06:54:21 UTC 2018
From: Rancid-discuss <rancid-discuss-bounces at shrubbery.net> On Behalf Of
Ryan Melville
Sent: Wednesday, August 22, 2018 5:41 PM
To: heasley <heas at shrubbery.net>
Cc: rancid-discuss at shrubbery.net
Subject: Re: [rancid] Help Using git with RANCID
>Thank you for the advice, which got me on the right track. I think those
commands probably would have worked as-is, but my ideal state was having
RANCID's local git workspace wire directly back to my git server *only* and
not also push to the local ($CVSROOT) git repo.
>So my steps were the following, picking up after the "sudo -H -u rancid
/mnt/rancid/rancid/bin/rancid-cvs" command:
>1) Create new empty 'rancid-<group>' repository on my (external) master git
server (Atlassian Bitbucket, in my case).
>2) Create 'rancid' user on my master git server, and give it read/write
permission to the new repo.
>3) Store 'rancid' user git credentials on my RANCID server, which requires
a temporary clone that is then immediately deleted.
sudo -H -u rancid git config --global user.name "rancid"
sudo -H -u rancid git config --global user.email "rancid@<mydomain>"
sudo -H -u rancid git config --global credential.helper store
sudo -H -u rancid git clone https://rancid@
<https://rancid@%3cmy-git-server%3e/scm/rancid-%3cgroup%3e.git>
<my-git-server>/scm/rancid-<group>.git
(enter 'rancid' user passwords when prompted)
sudo -H -u rancid rm -rf rancid-all
>4) Re-wire RANCID's git workspace to the master git server, instead of its
local git server/repo. Uses my particular RANCID installation path and
group name ("all").
>cd /mnt/rancid/rancid/var/all
sudo -H -u rancid git remote set-url origin https://rancid@
<https://rancid@%3cmy-git-server%3e/scm/rancid-all.git>
<my-git-server>/scm/rancid-all.git
sudo -H -u rancid git push -u origin --all
sudo -H -u rancid git push origin --tags
>At this point, I made a change to a network device, waited for my next cron
execution of rancid-run, and then observed the changes in my master git
repo, so I believe it was all working well.
Was or is? Big difference!
>Regards,
>Ryan Melville
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20180823/e4a982b4/attachment.html>
More information about the Rancid-discuss
mailing list