From b662a6fa0e8797f2f10fa16ded26add8a9fc3eb9 Mon Sep 17 00:00:00 2001 From: Frostebite Date: Tue, 10 Jun 2025 20:09:34 +0100 Subject: [PATCH] Refactor URL configuration in RemoteClient for token-based authentication - Updated comments for clarity regarding the purpose of URL configuration changes. - Simplified the git configuration commands by removing redundant lines while maintaining functionality for HTTPS token-based authentication. - This change enhances the readability and maintainability of the RemoteClient class's git setup process. --- dist/index.js | Bin 15146895 -> 15146253 bytes dist/index.js.map | Bin 16838952 -> 16838262 bytes src/model/cloud-runner/remote-client/index.ts | 16 ++-------------- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/dist/index.js b/dist/index.js index 8d5f851dee83484eeb5a69059189e5e9c09d6d80..b5ba506c3335f0a85433922ae49ccdce9295c28c 100644 GIT binary patch delta 1012 zcmYkzS9?eY0D$3#gBZ1sadqP zQi>X_dE-xb-MM)0zHj;2oQP%lIT3TR3uG6}4dUX8M~|2=DY{cyT59jGO>B@6W+nxZ zVas|!Ot>N`hz(O?gQj6ha!@tQN)FQ3CIqGOUc?903cvTQnwS{%uIu>j4Ht?jL}7{$ zK~aiPoDzIMNlH<*7hLDp8p#RHYgpQJrXNP?K8JrVcUGC6}4POIl#~S!a)vkm?IqJ7`Yth1bLj~SMvFdQ=H}uXF11te&+%g zxx^p*$z`r^m1|t*1~<9IU)<&ne{+|6{KI`7@Q{Cb#ABZDl>hjjXFTTxFL{-hlKi^o Fo41K8WC{QP delta 1120 zcmZwA*;kcS0LI}J-ysamh|(~#kS0Rqcr1m;lCr`|3{ndvO(X*}AOcDotsoj8HL|Y^ z8yvEh*mQ~c{h9$8eH7rOE^7@v6y>FD)&&@2Yt_(}+B7=I@ ztmUI4k+3@!q=eC)xM)Y!h@ddOwIUNksG;*o5^Dmw{R=BF`0a( za61JQatBkH#&quFE{d4JOp3XiSkZER-;JK4o<_OO?)*~fkkaFB2KmhbqULmcJ@j_@Nt@iV{hE5C7+V;tuMzw-xw Q@)v*ePe*sGC;#9709(HGQ~&?~ diff --git a/dist/index.js.map b/dist/index.js.map index 21d05ddf74d7350a585b7025b71e2d0116b47bd9..b6f2aea522a8cd26731cfedaf5421dfefed80363 100644 GIT binary patch delta 1144 zcmYkxX?)HF007|M9C_O+)yi4Cf5}QYBGIjz3Y#q!MT${tTj{Wd9Peh8E@u7988Ju7 z=y*x45T-+F5sM`q>k@_TJRf~{K0OQe#Ue+lVv+KSKH=E1R@E&frWM(2zznrU^|si?eA)bE5Iw%plq# zF`AV(JlZWIBQ-solppjDYYKvy@#;}QW!>W|ZDX@WVd}`BUzidLCWgLwxUDd#6P9-j z+J$XL2d%>FF+pNjJt2q`mlg%I;2c_VF0Dx6JkF;z7jPkMXiGcVa}gcr$i;Nx5<1g` zOSz28xq>UXimU0$HC)SeT+a>M$W3&kJ2!I+x6*^2^dglsdXr8Dx6y~bWO6(G=+7P8 z$p8j&7lXK)dl<|RvKY!R?&UtRxt|RYYWH=A;FpuykBgp453K+>KM)Nph7|S@u z6QhtKCQ!^1Jjqi`w(PyEa;9NdAD1Y!LfAKf}@Gt-I|H{&$gp%xIOHxH- delta 1238 zcmZY2XIRYv6vy!=G?Y=gRHE*`vdJykB72l1d*mXS7a0*E zDJwG~d++S=y>Ie(y!f2wJm;L}cPdH~j55m;jIs-SQoST;xuGUn*L(}5UWTQaNrFP2 zsF3TS3aX+S^kD!)7@<0hVS*Z{iCU-)Q<$L+%ppNt)Pn^qVTJmzMgug24QwIRD&&IH zP87UtB%&21Ia28YI1&LUu6wJjUm5{89wAXbGmAT%3Xa7g~s|D-IzaFAA-OpH* zX@r)E8npmB*uw#h&=^h76wS~aEugz^1xK`o3{G%H8@Qk?+MzuP5|yC}mw+($Vc;2|F2F`nQlp5ZxO;3Zz+HQwMY-r+qy c;3Gbv0-x~(U-1p!@dH2c3%_$TYQ4g+KfOzIP5=M^ diff --git a/src/model/cloud-runner/remote-client/index.ts b/src/model/cloud-runner/remote-client/index.ts index dc7808dc..6a54771e 100644 --- a/src/model/cloud-runner/remote-client/index.ts +++ b/src/model/cloud-runner/remote-client/index.ts @@ -236,16 +236,10 @@ export class RemoteClient { await CloudRunnerSystem.Run(`git config --global --unset-all url."ssh://git@github.com/".insteadOf || true`); await CloudRunnerSystem.Run(`git config --global --unset-all url."git@github.com".insteadOf || true`); - // Set new URL configuration with token + // Set new URL configuration with token for HTTPS await CloudRunnerSystem.Run( `git config --global url."https://${gitPrivateToken}@github.com/".insteadOf "https://github.com/"`, ); - await CloudRunnerSystem.Run( - `git config --global url."https://${gitPrivateToken}@github.com/".insteadOf "ssh://git@github.com/"`, - ); - await CloudRunnerSystem.Run( - `git config --global url."https://${gitPrivateToken}@github.com/".insteadOf "git@github.com"`, - ); await CloudRunnerSystem.Run(`git lfs pull`); RemoteClientLogger.log(`Successfully pulled LFS files with GIT_PRIVATE_TOKEN`); @@ -266,16 +260,10 @@ export class RemoteClient { await CloudRunnerSystem.Run(`git config --global --unset-all url."ssh://git@github.com/".insteadOf || true`); await CloudRunnerSystem.Run(`git config --global --unset-all url."git@github.com".insteadOf || true`); - // Set new URL configuration with token + // Set new URL configuration with token for HTTPS await CloudRunnerSystem.Run( `git config --global url."https://${githubToken}@github.com/".insteadOf "https://github.com/"`, ); - await CloudRunnerSystem.Run( - `git config --global url."https://${githubToken}@github.com/".insteadOf "ssh://git@github.com/"`, - ); - await CloudRunnerSystem.Run( - `git config --global url."https://${githubToken}@github.com/".insteadOf "git@github.com"`, - ); await CloudRunnerSystem.Run(`git lfs pull`); RemoteClientLogger.log(`Successfully pulled LFS files with GITHUB_TOKEN fallback`);