Skip to content

[Git] fatal: unable to access 'upstream': The requested URL returned error: 403 #155

@jankeromnes

Description

@jankeromnes

Describe the bug

I'm unable to push to upstream, even though I should be able to.

(Pushing to origin works fine on Gitpod, and pushing to upstream from a non-Gitpod environment also works fine.)

To Reproduce

Open this pull request in Gitpod: https://gitpod.io/#https://github.com/mozilla/release-services/pull/1706

Then, try to push a commit to upstream/staging:

gitpod /workspace/services $ git remote -v
origin  https://github.com/jankeromnes/services.git (fetch)
origin  https://github.com/jankeromnes/services.git (push)
upstream        https://github.com/mozilla/release-services.git (fetch)
upstream        https://github.com/mozilla/release-services.git (push)

gitpod /workspace/services $ git push -f upstream "clean-up-after-before:staging"
remote: Permission to mozilla/release-services.git denied to jankeromnes.
fatal: unable to access 'https://github.com/mozilla/release-services.git/': The requested URL returned error: 403

As you can see, it fails with 403.

Expected behavior

Pushing to upstream/staging should work, just like in my local checkout:

(Note, I call Gitpod's upstream origin, and my personal fork jankeromnes instead of origin.)

jan@fox:/c/services (clean-up-after-before) $ git remote -v
jankeromnes	https://github.com/jankeromnes/services.git (fetch)
jankeromnes	https://github.com/jankeromnes/services.git (push)
origin	https://github.com/mozilla-releng/services (fetch)
origin	https://github.com/mozilla-releng/services (push)

jan@fox:/c/services (clean-up-after-before) $ git push origin "clean-up-after-before:staging"
Enumerating objects: 13, done.
Counting objects: 100% (13/13), done.
Delta compression using up to 8 threads
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 629 bytes | 209.00 KiB/s, done.
Total 7 (delta 5), reused 0 (delta 0)
remote: Resolving deltas: 100% (5/5), completed with 5 local objects.
remote: This repository moved. Please use the new location:
remote:   https://github.com/mozilla/release-services.git
To https://github.com/mozilla-releng/services
   c20f2b1b..13487b42  clean-up-after-before -> staging

Metadata

Metadata

Assignees

No one assigned

    Labels

    meta: staleThis issue/PR is stale and will be closed soon

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions