#9601 git push to pagure is failing with publickey issues
Closed: Fixed 3 years ago by rlengland. Opened 3 years ago by rlengland.

Following the instructions to use git here:
https://docs.fedoraproject.org/en-US/fedora-docs/contributing/git/

The mainstream repo I am using is
https://pagure.io/fedoramagazine-images.git

my fork is
ssh://git@pagure.io/forks/rlengland/fedoramagazine-images.git

I can successfully clone the repo and check out. But when I make my addition, add it, and commit it and then try to do my "push" I get the following ('tbird-filters' is my branch name):

$ git push origin tbird-filters
sign_and_send_pubkey: signing failed for RSA "/home/rengland/.ssh/id_rsa" from agent: agent refused operation
git@pagure.io: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I have added my public key from my ~/.ssh/id_rsa.pub file and have the permissions set

-rw-------. 1 rengland rengland 2655 Jan 22 18:00 id_rsa
-rw-r--r--. 1 rengland rengland 568 Jan 22 18:00 id_rsa.pub
-rw-------. 1 rengland rengland 341 Dec 19 18:24 info.txt
-rw-------. 1 rengland rengland 3578 Jan 22 23:11 known_hosts

and I've used 'systemctl restart sshd' but I've run out of ideas.

I need assistance/insight on what I may have wrong or have misconfigured.


When do you need this to be done by? (YYYY/MM/DD) I'm not in a rush

2021/02/29


my fork is
ssh://git@pagure.io/forks/rlengland/fedoramagazine-images.git

That should be 'fork' there not 'forks' right?
ie, it's:
https://pagure.io/fork/rlengland/fedoramagazine-images

I can successfully clone the repo and check out. But when I make my addition, add it, and commit it and then try to do my "push" I get the following ('tbird-filters' is my branch name):

$ git push origin tbird-filters
sign_and_send_pubkey: signing failed for RSA "/home/rengland/.ssh/id_rsa" from agent: agent refused operation
git@pagure.io: Permission denied (publickey).
fatal: Could not read from remote repository.

This is usually caused by your local ssh-agent being broken/dead/not having your keys loaded into it.

If you logout and back on does it start working?

Does 'ssh-add -L' show your ssh public key?

Have you changed your ssh key recently? If so, have you updated it in your prefs on pagure.io?

Sorry for the length of this addition but I want to give you as much info as I can

=============Logged out and back in but I get the same results.
$ ssh-add -L
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDYTZouiHxZKxplZl1p/JEVpNu8hdG+RMuZ1UseGqkG17DrrPi394bOwe8rV8TeNNuDPK8oaPjN+elvZagr5+adDfpO/Js5vrIqqjfrO0KqSO7dhMLEZhH2tRMkZY1czsZLOEJzdNTZBshIZUVfdoz8LWsOtJSju9XBRYgM2xV2cw2sBTRDzyfZu7yVR2zRg2+DlXkgnxMlhiZikOBRUCZPMJAYsRll1o4GQVdgSS1E3w1AgHR+/O72iFkDtEtWwjAtfHQ2K6PKDudX6mhKSBzh6dxvVmHcTYuSdz5HvFjyMBu+kf9ClMXkuoP27uAr0rnOwWfBSqbiDx5UkiXifbH6xpIgtor4ebbmW7irmHyCTxVbfmvpLje5Yvy7UefLRSas+ft15D3jj3v+/5snc7iYWKG6UnsP6HDabRfb6M0+2Oc33W/C8IKgmOAkvN4IqK/LBmuQqzpKTWgAP77XugHZKuxMa8aWGCuVP/FE0QqR/GO+A10o7NFLEt1eMPb6530= rengland@morse

==============This is the key I entered in my account at
https://pagure.io/settings#nav-ssh-tab

I did this as a cut and paste and I noted that the embedded '/'
characters seemed to cause line breaks in the text entry box when I
added it, as it did in the text above. I don't know if that is a problem but I don't see a way
around it unless I need to escape them in some manner.

=============prefs on pagure.i

=============I use this to create my local repo
$ git clone https://pagure.io/fedoramagazine-images -o upstream
=============and the repo is created

=============The fork I am working from is shown on the web page as
https://pagure.io/fork/rlengland/fedoramagazine-images

=============on that page the Clone drop down shows
ssh://git@pagure.io/forks/rlengland/fedoramagazine-images.git

=============I use that address here
$ cd fedoramagazine-images
$ git remote add orign ssh://git@pagure.io/forks/rlengland/fedoramagazine-images.git

=============Then
$ git checkout master
Already on 'master'
Your branch is up to date with 'upstream/master'.
[Mon Jan 25 17:01:51 rengland@morse ~/workspace/fedora_magazine/fedoramagazine-images]$ git pull
warning: Pulling without specifying how to reconcile divergent branches is
discouraged. You can squelch this message by running one of the following
commands sometime before your next pull:

git config pull.rebase false # merge (the default strategy)
git config pull.rebase true # rebase
git config pull.ff only # fast-forward only

You can replace "git config" with "git config --global" to set a default
preference for all repositories. You can also pass --rebase, --no-rebase,
or --ff-only on the command line to override the configured default per
invocation.

Already up to date.

=============Create a working branch:

$ git checkout -b Tbird-filters
Switched to a new branch 'Tbird-filters'

=============Did some work and added a file ....

$ git add images/Tbird_mail_filters.svg
$ git commit -m 'added image for Intro to Thunderbird mail filters'
[Tbird-filters d340d62] added image for Intro to Thunderbird mail filters
1 file changed, 397 insertions(+)
create mode 100644 images/Tbird_mail_filters.svg
$ git push origin Tbird-filters
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Metadata Update from @asaleh:
- Issue assigned to pingou
- Issue tagged with: low-gain, medium-trouble

3 years ago

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

3 years ago

Would you by any chance the possibility to drop by #fedora-admin on freenode and ping me? I think it would help if we can debug this "live". I'll keep looking through the logs and the system in the meantime to see if I can find something

Metadata Update from @pingou:
- Issue untagged with: low-gain, medium-trouble
- Issue priority set to: Needs Review (was: Waiting on Assignee)

3 years ago

Metadata Update from @pingou:
- Issue priority set to: Waiting on Assignee (was: Needs Review)
- Issue tagged with: low-gain, medium-trouble

3 years ago

Issue resolve by correctly setting the permission on the .ssh directory and it's contents.

Metadata Update from @rlengland:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata