Git submodule များအတွက် Proxy လမ်းကြောင်း
အဓိက Git repository သည် proxy မှတစ်ဆင့် အလုပ်လုပ်သော်လည်း submodule များ မလုပ်ပါက URL၊ သယ်ယူပို့ဆောင်ရေးနည်းလမ်းနှင့် repository ပြင်ဆင်မှုကို စစ်ပါ။
အဓိက repository ကို clone အောင်မြင်ခြင်းသည် submodule များကို စမ်းသပ်ထားခြင်း မဟုတ်ပါ။ Submodule သည် အခြား Git repository တစ်ခုဖြစ်ပြီး အခြား host နှင့် အခြား transport ကို အသုံးပြုနိုင်သည်။
ကြေညာထားသော URL များကို ဖတ်ခြင်းဖြင့် စပါ:
git -C project config --file .gitmodules --get-regexp '^submodule\..*\.url$'
git -C project submodule status --recursive
HTTPS ဖြင့် ရယူထားသော parent တွင် git@host: သုံးသည့် submodule ပါနိုင်သည်။ HTTP proxy setting သည် ထို SSH ဆက်သွယ်မှုကို မပြင်ဆင်ပေးပါ။ Relative URL များကို project အမည်မှ ခန့်မှန်းထားသည့် web address မဟုတ်ဘဲ superproject ၏ သင့်တော်သော remote အပေါ် အခြေခံ၍ ဖြေရှင်းပါ။
Repository-local setting များတွင် အကျယ်အဝန်းရှိသည်
ဒေသခံ http.proxy ထည့်သွင်းချက်သည် ၎င်းကို ပါဝင်ထားသော configuration ဖိုင်ရှိသည့် repository နှင့် သက်ဆိုင်သည်။ Parent တစ်ခုတည်းကို စစ်ဆေးခြင်းဖြင့် initialize ပြုလုပ်ထားသော child ၏ setting အားလုံးကို သိနိုင်သည်ဟု မယူဆပါနှင့်။
Recursive update အတွင်း ယာယီ HTTPS proxy သတ်မှတ်ရန် ထိုခေါ်ဆိုမှုတွင် Git command-line configuration ပေးပါ:
git -C project -c http.proxy=http://203.0.113.10:8080 \
submodule update --init --recursive
နမူနာ endpoint ကို ပြောင်းပါ။ အများသုံး proxy ခွင့်ပြုသည့် လမ်းကြောင်းရှိ public HTTPS submodule များအတွက် HTTP proxy list မှ လိပ်စာရွေးပါ။ ၎င်းသည် SSH URL ကို HTTPS သို့ မပြောင်းပါ။ လမ်းကြောင်း မမျှော်လင့်ထားလျှင် URL-specific setting ကိုလည်း စစ်ပါ။
မှတ်ပုံတင်ထားသော URL ပြောင်းသည့်အခါ
Git သည် initialize လုပ်စဉ် submodule configuration ကို local တွင် မှတ်ပုံတင်သည်။ Proxy ကို အပြစ်မတင်မီ လက်ရှိကြေညာချက်နှင့် local တန်ဖိုးကို နှိုင်းယှဉ်ပါ။ sync လုပ်ဆောင်ချက်သည် project ကြေညာချက်မှ URL များကို မွမ်းမံပေးသော်လည်း ကိုယ်တိုင် network proxy setting မဟုတ်ပါ။
Nested failure တွင် အမှားထဲပါသော submodule လမ်းကြောင်းနှင့် remote ကို မှတ်သားပါ။ Recursive လုပ်ဆောင်ချက်သည် host များစွာကို ဆက်သွယ်နိုင်သည်။ အတွင်း host သည် တိုက်ရိုက်ချိတ်ဆက်ခွင့်လိုနိုင်ပြီး public host သည် proxy သုံးနိုင်သည်။
Transport error နှင့် repository error ကို ခွဲထားပါ။ မရနိုင်သော commit၊ repository က ခွင့်မပြုသော access နှင့် proxy ချိတ်ဆက်မှု ပျက်ခြင်းတို့သည် ‘submodule update failed’ ရလဒ်၏ မတူညီသော အကြောင်းများဖြစ်သည်။