mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +03:00
build: stop git from waiting forever at username/password prompts
If a git fetch/clone/submodule URL points to gitlab, github, bitbucket, etc and that repo does not exist any more, those services will prompt the user for a username/password so that the service can check if its a private repo. Private repos show up the same as non-existent repos. This employs two techniques for making sure that git never waits at those prompts. It instead should just fail immediately. The buildserver has been hanging on these prompts forever, until manually killed. This change will apply to updates both on the buildserver host, and the buildserver guest vm. This uses the "insteadOf" git config option to rewrite URLs to always use HTTPS and then include a fake username/password so that git will use those in the prompts and fail immediately. This trick has been in use on the verification server for a long while and has been working well. It has also been used on jenkins.debian.net in the host. https://f-droid.org/en/docs/Verification_Server/ It also includes GIT_TERMINAL_PROMPT, which also prevents the bad behavior, which was added in git 2.3. https://github.com/blog/1957-git-2-3-has-been-released
This commit is contained in:
parent
c45264b190
commit
fdbfb4d1a2
2 changed files with 30 additions and 13 deletions
|
@ -59,11 +59,6 @@ cd $WORKSPACE
|
|||
# set up Android SDK to use the Debian packages in stretch
|
||||
export ANDROID_HOME=/usr/lib/android-sdk
|
||||
|
||||
# ignore username/password prompt for non-existant repos
|
||||
git config --global url."https://fakeusername:fakepassword@github.com".insteadOf https://github.com
|
||||
git config --global url."https://fakeusername:fakepassword@gitlab.com".insteadOf https://gitlab.com
|
||||
git config --global url."https://fakeusername:fakepassword@bitbucket.org".insteadOf https://bitbucket.org
|
||||
|
||||
# now build the whole archive
|
||||
cd $WORKSPACE
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue