Authentication error on non existing projects

Bug #1735098 reported by Christian Ehrhardt  on 2017-11-29
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
usd-importer
Low
Unassigned

Bug Description

Hi,
on clone we auto-create a remote for the user name which is very useful.
I wonder if we could/should create that if not existing (OTOH that would be some serious proliferation).

Anyway the issue I'd like to see solved is, that if such a repo does not exist (before your first push of something) you will see Authentication errors on a git fetch.

So for example I cloned heartbeat, then I have
$ git remote -v
paelzer https://git.launchpad.net/~paelzer/ubuntu/+source/heartbeat (fetch)
paelzer ssh://<email address hidden>/~paelzer/ubuntu/+source/heartbeat (push)
pkg https://git.launchpad.net/~usd-import-team/ubuntu/+source/heartbeat (fetch)
pkg ssh://<email address hidden>/~usd-import-team/ubuntu/+source/heartbeat (push)

All fine, but on a git fetch --all I'll see.
$ git fetch --all
Fetching pkg
Fetching paelzer
Username for 'https://git.launchpad.net':
Password for 'https://git.launchpad.net':
remote: Authorisation required.
fatal: Authentication failed for 'https://git.launchpad.net/~paelzer/ubuntu/+source/heartbeat/'
error: Could not fetch paelzer

If I go on "https://git.launchpad.net/~paelzer/ubuntu/+source/heartbeat/" I see
"Repository '~paelzer/ubuntu/+source/heartbeat' not found."

We want to add it to be able to push, and whenever working we also want it to fetch from there (can be very useful to bring in e.g. old partial branches you want to continue on).
I wonder if we should provide a "git ubuntu fetch" being a thin wrapper and not fetching on your personal repo if it doesn't exist.

Setting prio to low as it:
- isn't nice but doesn't break anybody
- I don't have a good suggestion what would be better

But I wanted to report to get you thinking with me.

Changed in usd-importer:
importance: Undecided → Low
Nish Aravamudan (nacc) wrote :

There is no mechanism to distinguish between a private repository you can't see and a non-existent repository over HTTPS. I don't think this is solveable in the general case. I guess we could special-case a lp-user passed (or inferred) that matches gitubuntu.lpuser (which is supposed to be your LP username)? In that case, we could assume you don't have inaccessible repositories? Still seems fragile.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers