Closed Bug 1561632 Opened 5 years ago Closed 5 years ago

"root:authorization failed" error on "mach try", failed to push some refs to 'hg://hg.mozilla.org/try'

Categories

(Developer Infrastructure :: Try, defect)

defect
Not set
normal

Tracking

(firefox-esr60 unaffected, firefox-esr68 unaffected, firefox68 unaffected, firefox69 fixed)

RESOLVED FIXED
mozilla69
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- unaffected
firefox68 --- unaffected
firefox69 --- fixed

People

(Reporter: kvark, Assigned: glandium)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

My try pushes stopped worked (with "mach try"):

Bundling 3 changesets
Bundling 3 manifests
Bundling 18 revisions of 13 files
ERROR:root:authorization failed
Run the command again with `git -c cinnabar.check=traceback <command>` to see the full traceback.
error: failed to push some refs to 'hg://hg.mozilla.org/try'
Bundling 3 changesets^C

"git config --list" output:

kvark@ant /mnt/code/firefox $ git config --list
core.editor=subl -n -w
core.excludesfile=/home/kvark/.gitignore_global
user.name=Dzmitry Malyshau
user.email=dmalyshau@mozilla.com
cinnabar.helper=/mnt/base/tools/git-cinnabar/git-cinnabar-helper
credential.helper=store
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.central.url=hg://hg.mozilla.org/mozilla-central
remote.central.fetch=+refs/heads/*:refs/remotes/central/*
branch.branches/default/tip.remote=central
branch.branches/default/tip.merge=refs/heads/branches/default/tip
fetch.prune=true
remote.inbound.url=hg://hg.mozilla.org/integration/mozilla-inbound
remote.inbound.fetch=+refs/heads/*:refs/remotes/inbound/*
remote.try.url=hg://hg.mozilla.org/try
remote.try.fetch=+refs/heads/*:refs/remotes/try/*
remote.beta.url=hg://hg.mozilla.org/releases/mozilla-beta
remote.beta.fetch=+refs/heads/*:refs/remotes/beta/*

"ssh hg.mozilla.org" output:

A SSH connection has been successfully established.

Your account (dmalyshau@mozilla.com) has privileges to access Mercurial over
SSH.

You are a member of the following LDAP groups that govern source control
access:

   scm_level_1, scm_level_2, scm_level_3

This will give you write access to the following repos:

   Firefox Repos (mozilla-central, releases/*), Project Repos (projects/), Try, User Repos (users/)

You will NOT have write access to the following repos:

   Autoland (integration/autoland), Localization Repos (releases/l10n/*, others), Version Control Tools (hgcustom/version-control-tools)

You did not specify a command to run on the server. This server only
supports running specific commands. Since there is nothing to do, you
are being disconnected.
Connection to hg.mozilla.org closed.
Assignee: infra → nobody
Component: Infrastructure: Tools → Mercurial: hg.mozilla.org
Product: Infrastructure & Operations → Developer Services
QA Contact: rtucker

Not sure why it stopped working out of a sudden, but with help from our team we found a way to fix it by adding "pushurl" to the git config:

[remote "try"]
	url = hg://hg.mozilla.org/try
	fetch = +refs/heads/*:refs/remotes/try/*
	skipDefaultUpdate = true
	pushurl = hg::ssh://hg.mozilla.org/try
	push = "+HEAD:ref/heads/branches/default/tip"
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID

This is a regression from bug 1554987.

Assignee: nobody → mh+mozilla
Status: RESOLVED → REOPENED
Component: Mercurial: hg.mozilla.org → Try
Product: Developer Services → Firefox Build System
Regressed by: 1554987
Resolution: INVALID → ---

Bug 1554987 made mach try use a transient remote, but that causes
problems with existing setups that happen to use the same remote name,
because of a combination of not-quite-as-documented-as-it-should
behavior of git.

  • git -c foo.bar=qux doesn't override the value of foo.bar from the
    git configuration when foo.bar is an item that can take several
    values.
  • remote.$remote.url and remote.$remote.pushurl take several values,
    allowing to give several URLs.

The combination of both means that if the git configuration already has
remote.try.url set, that value takes precedence (because git push
tries them one after the other, and takes the one from the command line
last)

One way we could increase the chances of things working out fine would
be to use remote.try.pushurl, which if already set, is more likely to
be right than an existing remote.try.url.

OTOH, it turns out, after more investigation, that bug 1554987 requires
a footgunny setup to happen in the first place. Namely, it requires
having run git lfs install from a git-cinnabar clone.

so we just go back to the previous status quo.

Could you use something more unique than try for the remote name defined in the command? If there's no collision presumably it should work.

Considering the footgunny nature of the original problem (having the git lfs hooks is going to cause other problems), I don't think it's worth fixing this further, thus the attached patch being a backout. With a full explanation for posterity.

Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Has Regression Range: --- → yes
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: