Daily.sh updating codebase through socks5 proxy

Hello,

my librenms is behind a firewall with no internet access. I am trying to have daily.sh use the socks5 proxy when checking/updating master.

Version 1.36-10-g5384d1c - Tue Jan 30 2018 16:16:18 GMT-0500
DB Schema #232
Web Server nginx/1.12.2
PHP 7.0.25
MySQL 5.5.56-MariaDB
RRDtool 1.6.0

STEPS
From the CML as root:

ssh -N -D 9999 [email protected]

From another CML as root:

cd /opt/librenms
git config --global http.proxy socks5://localhost:9999
git pull
remote: Counting objects: 719, done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 719 (delta 519), reused 519 (delta 514), pack-reused 185
Receiving objects: 100% (719/719), 640.52 KiB | 0 bytes/s, done.
Resolving deltas: 100% (563/563), completed with 270 local objects.
From https://github.com/librenms/librenms
   788c0bd..5384d1c  master     -> origin/master
 * [new branch]      1.36       -> origin/1.36
 * [new branch]      kkrumm1-patch-1 -> origin/kkrumm1-patch-1
   6ebec8a..7982114  php53      -> origin/php53
 * [new tag]         1.36.01    -> 1.36.01
 * [new tag]         20160828   -> 20160828
 * [new tag]         201609     -> 201609
 * [new tag]         201609.01  -> 201609.01
From https://github.com/librenms/librenms
 * [new tag]         1.36       -> 1.36
Updating 788c0bd..5384d1c
Fast-forward
 .gitignore                                                                 |     1 -
 .travis.yml                                                                |     2 +-
 AUTHORS.md                                                                 |     1 +
 LibreNMS/Alert/Transport/Pushover.php                                      |     9 +-
 LibreNMS/Authentication/SSOAuthorizer.php                                  |     6 +-
 LibreNMS/ComposerHelper.php                                                |     7 +
 LibreNMS/OS/Ptp250.php                                                     |    18 +-
 LibreNMS/OS/Ptp500.php                                                     |   146 +

Looks like it needed a lot of changes :sweat_smile:

But daily.sh does not work…

./daily.sh 
Re-running /opt/librenms/daily.sh as librenms user
Updating to latest codebase                        FAIL
fatal: unable to access 'https://github.com/librenms/librenms.git/': Failed connect to github.com:443; Operation now in progress
Updating SQL-Schema                                OK
Updating submodules                                OK
Cleaning up DB                                     OK
Fetching notifications                             OK
Caching PeeringDB data                             OK

But git pull does

git pull
Already up-to-date.

So then i appended to /opt/librenms/.git/config

[http]
	proxy = socks5://localhost:9999

Then daily.sh worked:

./daily.sh 
Re-running /opt/librenms/daily.sh as librenms user
Updating to latest codebase                        OK
Updated from 5384d1c to 8a91768                    OK
Updating SQL-Schema                                OK
Updating submodules                                OK
Cleaning up DB                                     OK
Fetching notifications                             OK
Caching PeeringDB data                             OK

Not sure is this is the best way to do this… ???
Is there an option withing config.php that i can set?

Thank you,
dave

Setting the proxy for git should be all you need.

Got it!

Thanks!