#4763 Failed to clone docs repo of ODCS
Closed: Fixed 4 years ago by lsedlar. Opened 4 years ago by lsedlar.

I created a new deploy key to automate updating documentation.

However I'm having issues with cloning the repo:

$ GIT_SSH_COMMAND="ssh -v" git clone ssh://git@pagure.io/docs/odcs.git docs-on-pagure
Cloning into 'docs-on-pagure'...
...
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/jenkins/.ssh/id_rsa RSA SHA256:p0mM6xzGYyzMalZwyBEpcMsjyIMn6E+RU8019R7fhQo
debug1: Server accepts key: /home/jenkins/.ssh/id_rsa RSA SHA256:p0mM6xzGYyzMalZwyBEpcMsjyIMn6E+RU8019R7fhQo
debug1: Authentication succeeded (publickey).
Authenticated to pagure.io ([8.43.85.75]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: Remote: Key is restricted.
debug1: Remote: Forced command.
debug1: Remote: Key is restricted.
debug1: Remote: Forced command.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending command: git-upload-pack '/docs/odcs.git'
No such repository
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
Transferred: sent 3192, received 4000 bytes, in 1.1 seconds
Bytes per second: sent 2889.6, received 3621.0
debug1: Exit status 1

The same key can clone the main repo without problems.

With my normal key I can clone the repo fine, but @jlanda mentioned in IRC he was getting the same error as above.

Is something wrong with the key or the repo?


Metadata Update from @pingou:
- Issue assigned to pingou

4 years ago

Ok, I see the repo on disk, it's right next to the pagure one. I can clone the pagure one fine, but not the odcs one.

The only clue, I see is this No such repository but so far not seeing light

I am seeing recent commits from jenkins to this repo, how does that happen?

That's a different Jenkins instance that is not under my control. It's using some other key. Maybe @jkaluza knows how it was created.

So the issue seems to be that you're using a deploy key which do not have access to the doc repo.

If you're using a regular ssh key (and have access to the repo, I don't that's why I'm blocked), then it works.

This changes this ticket into a RFE which is a one-liner that I have ready here :)

Metadata Update from @pingou:
- Issue set to the milestone: 5.9
- Issue tagged with: RFE

4 years ago

I finally found time to try this again, and I'm still seeing the same issue. I think the patch is not using the correct repo type. The detection seems to be using docs, while the check has doc.
https://pagure.io/pagure/pull-request/4873

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

4 years ago

Metadata Update from @pingou:
- Issue set to the milestone: 5.10 (was: 5.9)

4 years ago

Metadata Update from @ngompa:
- Issue set to the milestone: 5.11 (was: 5.10)

4 years ago

@ngompa do you think you could backport https://pagure.io/pagure/pull-request/4873 to 5.10.0? It would allow us to deploy it and @lsedlar to test it

Yes, I can do that. There's a couple of other backports I want to queue up too...

I can confirm the clone is working fine now. I don't seem to be able to push though:

06:48:27  + git push origin master
06:50:33  remote: Empty compile time value given to use lib at hooks/update line 6.        
06:50:33  remote: WARNING: Use of uninitialized value $repo in concatenation (.) or string at /usr/share/perl5/vendor_perl/Gitolite/Conf/Load.pm line 252, <DATA> line 1.        
06:50:33  remote: 
06:50:33  remote: FATAL: invalid repo ''        
06:50:33  remote: error: hook declined to update refs/heads/master        
06:50:33  To ssh://pagure.io/docs/odcs.git
06:50:33   ! [remote rejected] master -> master (hook declined)
06:50:33  error: failed to push some refs to 'ssh://git@pagure.io/docs/odcs.git'

Odd, I'm pretty sure we're not supposed to be using Gitolite anywhere...

Could you try again, we had left over gitolite which I've cleaned since

I'm still getting the same error.

Metadata Update from @pingou:
- Issue set to the milestone: 5.12 (was: 5.11)

4 years ago

@lsedlar I seem to remember you saying this is now fixed, right? (iiuc it was in an infra ticket, but I'm not sure right now if it was the same issue or a different one)

It was this issue. My jenkins instance can now clone and push the docs using a deploy key. All is well as far as I can tell.

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

4 years ago

Log in to comment on this ticket.

Metadata
Related Pull Requests
  • #4774 Merged 4 years ago