Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with githubrepo hook #1838

Closed
lsochanowski opened this issue Jun 27, 2019 · 4 comments
Closed

problem with githubrepo hook #1838

lsochanowski opened this issue Jun 27, 2019 · 4 comments

Comments

@lsochanowski
Copy link

configuration like bellow ,
problem is oxidize is looping with information "Authenticating using ssh keys as 'git'"
when i've try to push manualy it's working fine .. i can use workaround with exec hook but problem persist ;)

`output:
default: git
git:
user: Oxidized
email: o@eot.pl
repo: "/var/lib/oxidized/devices.git"
hooks:
push_to_remote:
type: githubrepo
events: [post_store]
remote_repo: git@gitlab.eot.pl:oxidized/configarchive.git
publickey: /etc/oxidized/.ssh/id_rsa.pub
privatekey: /etc/oxidized/.ssh/id_rsa

`

`D, [2019-06-27T11:08:34.690209 #18272] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git'
D, [2019-06-27T11:08:34.691283 #18272] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git'
D, [2019-06-27T11:08:34.692466 #18272] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git'
D, [2019-06-27T11:08:34.693549 #18272] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git'
D, [2019-06-27T11:08:34.694620 #18272] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git'
D, [2019-06-27T11:08:34.695673 #18272] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git'
D, [2019-06-27T11:08:34.696734 #18272] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git'
D, [2019-06-27T11:08:34.697775 #18272] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git'
D, [2019-06-27T11:08:34.700743 #18272] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git'
D, [2019-06-27T11:08:34.703617 #18272] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git'
^CD, [2019-06-27T11:08:34.704872 #18272] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git'
D, [2019-06-27T11:08:34.706195 #18272] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git'
D, [2019-06-27T11:08:34.707665 #18272] DEBUG -- : GithubRepo: Authenticating using ssh keys as 'git'

  • Gracefully stopping, waiting for requests to finish
    === puma shutdown: 2019-06-27 11:08:34 -0400 ===
  • Goodbye!
    oxidized@rancid:/var/lib/oxidized/devices.git$ git push
    Counting objects: 3, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (3/3), 295 bytes | 0 bytes/s, done.
    Total 3 (delta 2), reused 0 (delta 0)
    To gitlab.eot.pl:oxidized/oxidized.git
    795c25a..cd12e55 master -> master
    oxidized@rancid:/var/lib/oxidized/devices.git$
    `
@wk
Copy link
Contributor

wk commented Jun 28, 2019

There is no indication if the same key(s) configured for Oxidized are being used in the manual attempt during the git push. Are the keys unlocked and un-passworded?

You may want to use a combination of ssh-add -L (to identify if some keys may be loaded or forwarded), and ssh -i <filename> pointing to the specific key files you've instructed oxidized to use while testing ssh connectivity and authentication, instead of a simple git push, and attempt to log in as the configured user.

If this succeeds, your remote server may require some combination of ssh parameters which libssh2 (used by Rugged) is not compiled for on your host. Which version of libssh2 do you currently have installed?

@lsochanowski
Copy link
Author

oxidized@rancid:/var/lib/oxidized/devices.git$ ssh -i ~/.ssh/id_rsa git@gitlab.eot.pl
PTY allocation request failed on channel 0
Welcome to GitLab, @rancid1!
Connection to gitlab.eot.pl closed.
oxidized@rancid:/var/lib/oxidized/devices.git$

libssh2-1-dev/stable,stable,now 1.7.0-1+deb9u1 amd64 [installed]

this user have only one key :)

@no-response no-response bot removed the user_pending label Jul 1, 2019
@tyler-8
Copy link

tyler-8 commented Aug 13, 2019

@lsochanowski Take a look at this comment: #1877 (comment)

@ciroiriarte
Copy link

ciroiriarte commented Oct 20, 2022

I see a similar behaviour:

GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'
GithubRepo: Authenticating using ssh keys as 'git'

But no further errors. I had the key format error in previous attempts, but after converting both Public and Private keys I got no more errors, but still no repository push.

The key conversion steps:

cp .ssh/id_rsa .ssh/id_rsa-PEM
ssh-keygen -p -m PEM -f .ssh/id_rsa-PEM
ssh-keygen -e -m PEM -f .ssh/id_rsa.pub > .ssh/id_rsa.pub-PEM

And the config uses the *-PEM files for githubrepo hook.

Reference

  • gem
    oxidized-0.28.0
  • OS
    NAME="openSUSE Leap"
    VERSION="15.4"
  • Ruby
    ruby 2.5.9p229 (2021-04-05 revision 67939) [x86_64-linux-gnu]

@github-actions github-actions bot added the Stale label May 3, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants