mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-07 20:35:33 -04:00
Merge pull request #1 from kooply/git-credential
use git credentials instead of url rewrites
This commit is contained in:
commit
f050e9eb33
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
18
dist/platforms/ubuntu/steps/set_gitcredential.sh
vendored
18
dist/platforms/ubuntu/steps/set_gitcredential.sh
vendored
@ -7,12 +7,20 @@ else
|
|||||||
echo "GIT_PRIVATE_TOKEN is set configuring git credentials"
|
echo "GIT_PRIVATE_TOKEN is set configuring git credentials"
|
||||||
|
|
||||||
git config --global credential.helper store
|
git config --global credential.helper store
|
||||||
git config --global --replace-all url."https://token:$GIT_PRIVATE_TOKEN@github.com/".insteadOf ssh://git@github.com/
|
|
||||||
git config --global --add url."https://token:$GIT_PRIVATE_TOKEN@github.com/".insteadOf git@github.com
|
|
||||||
git config --global --add url."https://token:$GIT_PRIVATE_TOKEN@github.com/".insteadOf "https://github.com/"
|
|
||||||
|
|
||||||
git config --global url."https://ssh:$GIT_PRIVATE_TOKEN@github.com/".insteadOf "ssh://git@github.com/"
|
echo "activating credential halper..."
|
||||||
git config --global url."https://git:$GIT_PRIVATE_TOKEN@github.com/".insteadOf "git@github.com:"
|
git config --global credential.helper store
|
||||||
|
|
||||||
|
echo "writing credentials to helper..."
|
||||||
|
{
|
||||||
|
echo protocol=https
|
||||||
|
echo host=github.com
|
||||||
|
echo username=token
|
||||||
|
echo password=$GIT_PRIVATE_TOKEN
|
||||||
|
} | git credential approve
|
||||||
|
|
||||||
|
echo "displaying credentials file..."
|
||||||
|
cat $HOME/.git-credentials
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user