Page MenuHomePhabricator

vagrant git-update might fail if git username is not configured
Closed, DuplicatePublic

Description

==> Updating zotero_translators ...
[*] Updating repo in /vagrant/srv/zotero/translators ...
From https://gerrit.wikimedia.org/r/p/mediawiki/services/zotero/translators
 + 0476aa0...6fc0f92 master     -> origin/master  (forced update)
 * [new branch]      patched    -> origin/patched
First, rewinding head to replay your work on top of it...

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: empty ident name (for <vagrant@mediawiki-vagrant.dev>) not allowed
You need to set your committer info first
 ***** GIT PULL failed in /vagrant/srv/zotero/translators for branch 'master'

This probably only happens when upstream has force pushed so not a huge concern.

Getting the empty ident error on manual commit is a good thing so maybe vagrant should detect when it's missing and run with git pull -c user.name=vagrant?

See also T86299: Use Gerrit settings to configure git for MediaWiki-Vagrant.

Event Timeline

This is actually caused by the fact that we rewrote that repository's history. To fix this, execute this inside your Vagrant guest:

$ cd /vagrant/srv/zotero/translators/
$ git fetch --all
$ git checkout master
$ git reset --hard origin/master

Hm. I thought git pull --rebase can deal with forced updates if there are no local changes but reading more about it, it seems like that might not be the case, unless the rewrite was purely cosmetic and only changed commit summaries.

Aklapper triaged this task as Low priority.Dec 6 2022, 10:26 AM