#9860 403 error on a git push and a feature request.
Closed: Insufficient data 2 years ago by kevin. Opened 3 years ago by jatin1812.

I was writing a fedora quick docs about OpenCL on AMD hardware along with mesa. I have made my changes on local branch with adoc file but I am unable to git push due to a 403 error. I also generated API token. But it is not giving me option to type credentials and just throws a 403.

fatal: unable to access 'https://pagure.io/forks/jatin1812/fedora-docs/quick-docs.git/': The requested URL returned error: 403

Also as a feature request I want a functionality to simply be able to add files on my pagure fork. So that I can just click add file, put my adoc file or other changes in.


Is this now solved with the ssh push?

Metadata Update from @mobrien:
- Issue tagged with: low-gain, low-trouble, ops

3 years ago

Metadata Update from @mohanboddu:
- Issue priority set to: Waiting on Assignee (was: Needs Review)

3 years ago

I've the same issue over HTTPS. I can't push any code.

Can one or both of you please provide the full output of your 'git push' that failed and the exact time you tried so we can match it up with logs?

@jatin1812 @simonmanning did you see Kevin's question above?

I'm going to close this ticket as "Insufficient Data".

Please re-open if you run again into this, I hope it was just a fluke and that things are working fine now.

Metadata Update from @pingou:
- Issue close_status updated to: Insufficient data
- Issue status updated to: Closed (was: Open)

3 years ago

Hello, it seems it's happening again.

The full output of my 'git push' after I tried pushing to my fork over HTTPS was:

fatal: unable to access 'https://pagure.io/forks/patrikp/mirrors-countme.git/': The requested URL returned error: 403

The exact time was 10:02:33 UTC+02:00 (I've tried several other times over the previous ~45min from the same IP address).

As a workaround for now, everything works fine over ssh, though that won't help people behind a HTTP proxy much.

Best of luck.

Metadata Update from @asaleh:
- Issue status updated to: Open (was: Closed)

2 years ago

Whats in your .git/config for that fork? Is this still happening?

If you see this again, please do attach .git/config and the time...

Metadata Update from @kevin:
- Issue close_status updated to: Insufficient data
- Issue status updated to: Closed (was: Open)

2 years ago

This happened again to me:

[lorbus@fedora fedora-module-defaults]$ git push --set-upstream origin add-cri-o
fatal: unable to access 'https://pagure.io/forks/lorbus/releng/fedora-module-defaults.git/': The requested URL returned error: 403
[lorbus@fedora fedora-module-defaults]$ date -u
Wed Dec 22 05:12:54 PM UTC 2021
[lorbus@fedora fedora-module-defaults]$ cat .git/config
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "origin"]
        url = https://pagure.io/forks/lorbus/releng/fedora-module-defaults.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
        remote = origin
        merge = refs/heads/main
[credential]
        helper = store

The line in ~/.git-credentials looks like this:

https://lorbus:<APITOKEN>@pagure.io

git also won't ask me for creds if I unset the credential helper:

[lorbus@fedora fedora-module-defaults]$ git config --local --unset credential.helper
[lorbus@fedora fedora-module-defaults]$ git push origin add-cri-o 
fatal: unable to access 'https://pagure.io/forks/lorbus/releng/fedora-module-defaults.git/': The requested URL returned error: 403
[lorbus@fedora fedora-module-defaults]$ git --version
git version 2.33.1

(pushing via ssh works fine, just not via https)

You cannot use pagure api tokens for src.fedoraproject.org.

You must get a OIDC token for that. The easiest way would be to use 'fedpkg clone -a' or 'fedpkg push' and it will set it up in your config and have a browser run to get the token.
it's:

[credential]
helper = /usr/bin/fedpkg gitcred
useHttpPath = true

if you want to manually add it.

@kevin this is for pagure.io, not src.fedoraproject.org

Ah, right you are. Sorry for misreading it. ;(

Please reopen this ticket. I am getting this error when trying to push to my fork of a Pagure project over https:

% git push --set-upstream origin python                                       
fatal: unable to access 'https://pagure.io/forks/ryandesign/newt.git/': The requested URL returned error: 403

The Pagure documentation says it should prompt me for a username and password (or API key) but it does not.

It has never worked for me; this is the first time I've tried to contribute to a project hosted at Pagure. I have never had such problems contributing to projects on GitHub or GitLab.

I tried, as suggested on Stack Overflow, to change my remote's URL to include the username:

git remote set-url origin https://ryandesign@pagure.io/forks/ryandesign/newt.git

This didn't change the error.

I'm not uploading my .git/config because it's whatever git created by default.

Can you please open a new ticket?

You can't use username/password (as noted in the docs, this only works if pagure is in 'local' mode, which pagure.io is not), but I am not sure why it's not prompting you for username/api key.

Anyhow, please open a new ticket and we can try and get it figured out. Thanks

Login to comment on this ticket.

Metadata
Boards 1
ops Status: Done