son of YumHacking
goto
10.1.0.64/auth/asianux2/AXS3-RF/x86_64/run
$createrepo UPDATEgoto /etc/yum.repos.d/ there is FILE named asianux.repo
[core] name*Asianux Server 3 baseurl=http://peter:111111@10.1.0.64/auth/asianux2/AXS3-RF/x86_64/UPDATE/ enabled=1 gpgcheck=1 gpgkey=file:///usr/share/doc/asianux-release/RPM-GPG-KEY
NOTE: check auth_mysql to see how to insert stuff in db
now the final test
$yum listworks
if
---baseurl=http://peter:111111@10.1.0.64/auth/asianux2/AXS3-RF/x86_64/UPDATE/ +++baseurl=http://10.1.0.64/auth/asianux2/AXS3-RF/x86_64/UPDATE/
then
HTTP Error 401: Authorization Required
careful about the cache, it will ruin your test, so do this, when things go strange
[root@dhcp08 yum]# rm -rf core/ [root@dhcp08 yum]# pwd /var/cache/yum
use auth-client get ak file and tk file, see AddAuth write python code get ak and tk, and modify this way
baseurl=http://ak:tk@10.1.0.64/auth/asianux2/AXS3-RF/x86_64/UPDATE/yum will work fine with the new url, like the test above goes, to do everything as it can be done with common url
wget --no-check-certificate https://peter:111111@10.1.0.64/auth/asianux2/AXS3-RF/x86_64/UPDATE/RPMS/sos-1.7-9.16.2AXS3.noarch.rpm wget --no-check-certificate ak:tk wget --no-check-certificate https://426994C693EA41C2B9D77F1760A75344:4F3F6D92FF544746BF7A4642FFD58AB1@10.1.0.64/auth/asianux2/AXS3-RF/x86_64/UPDATE/RPMS/sos-1.7-9.16.2AXS3.noarch.rpmalso works
and actually tk is allowed to cut as short as
wget --no-check-certificate https://426994C693EA41C2B9D77F1760A75344:4F3F6D92@10.1.0.64/auth/asianux2/AXS3-RF/x86_64/UPDATE/RPMS/sos-1.7-9.16.2AXS3.noarch.rpm
the above still works, but if you remove again the last char
2then it will fail