David Sargrad created NIFIREG-207:
-------------------------------------
Summary: Failure to push to a custom git repository, despite
ability to push from clone repository
Key: NIFIREG-207
URL: https://issues.apache.org/jira/browse/NIFIREG-207
Project: NiFi Registry
Issue Type: Bug
Reporter: David Sargrad
I've configured a GIT repository to serve as the flow persistence provider. I
created a clone of the repository and configured nifi registry to point to that
clone. The clone is in directory
{noformat}
/var/lib/nifiregistry/git/eids-registry{noformat}
as seen in the following diff of my providers configuration.
{noformat}
diff providers.xml providers.xml.old
18d17
< <!--
23d21
< -->
24a23
> <!--
27,30c26,29
< <property name="Flow Storage
Directory">/var/lib/nifiregistry/git/eids-registry</property>
< <property name="Remote To Push">origin</property>
< <property name="Remote Access User">git</property>
< <property name="Remote Access Password">abc123</property>
---
> <property name="Flow Storage Directory">./flow_storage</property>
> <property name="Remote To Push"></property>
> <property name="Remote Access User"></property>
> <property name="Remote Access Password"></property>
31a31
> -->
54c54
< </providers>
---
> </providers>
{noformat}
The remote points to the corresponding origin.
{noformat}
[root@sensis-90076 eids-registry]# pwd
/var/lib/nifiregistry/git/eids-registry
[root@sensis-90076 eids-registry]# git remote -v show
origin [email protected]:eids-registry.git (fetch)
origin [email protected]:eids-registry.git (push)
[root@sensis-90076 eids-registry]#
{noformat}
NIFI-REGISTRY updates the clone properly.. but fails to push to origin.
{noformat}
2018-10-17 07:26:28,119 ERROR [GitFlowMetaData Push thread]
o.a.n.r.p.flow.git.GitFlowMetaData Failed to push commits to origin due to
org.eclipse.jgit.api.errors.TransportException:
[email protected]:eids-registry.git: remote hung up unexpectedly
org.eclipse.jgit.api.errors.TransportException:
[email protected]:eids-registry.git: remote hung up unexpectedly
at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:180)
~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
at
org.apache.nifi.registry.provider.flow.git.GitFlowMetaData.lambda$startPushThread$1(GitFlowMetaData.java:220)
~[nifi-registry-framework-0.3.0.jar:0.3.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
~[na:1.8.0_181]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
~[na:1.8.0_181]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
~[na:1.8.0_181]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
~[na:1.8.0_181]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
~[na:1.8.0_181]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
~[na:1.8.0_181]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_181]
Caused by: org.eclipse.jgit.errors.TransportException:
[email protected]:eids-registry.git: remote hung up unexpectedly
at
org.eclipse.jgit.transport.TransportGitSsh$SshPushConnection.<init>(TransportGitSsh.java:363)
~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
at
org.eclipse.jgit.transport.TransportGitSsh.openPush(TransportGitSsh.java:176)
~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:160)
~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
at org.eclipse.jgit.transport.Transport.push(Transport.java:1344)
~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:169)
~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
... 8 common frames omitted
Caused by: org.eclipse.jgit.errors.UnsupportedCredentialItem:
ssh://[email protected]:22:
org.eclipse.jgit.transport.CredentialItem$YesNoType:The authenticity of host
'mali.corp.sensis.com' can't be established.
RSA key fingerprint is ac:77:d6:6b:28:5f:6c:70:b8:34:13:b1:4b:ec:ad:c0.
Are you sure you want to continue connecting?
at
org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider.get(UsernamePasswordCredentialsProvider.java:127)
~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
at
org.eclipse.jgit.transport.CredentialsProviderUserInfo.promptYesNo(CredentialsProviderUserInfo.java:137)
~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
at com.jcraft.jsch.Session.checkHost(Session.java:793) ~[jsch-0.1.54.jar:na]
at com.jcraft.jsch.Session.connect(Session.java:345) ~[jsch-0.1.54.jar:na]
at
org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:136)
~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:140)
~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
at
org.eclipse.jgit.transport.TransportGitSsh$SshPushConnection.<init>(TransportGitSsh.java:338)
~[org.eclipse.jgit-4.11.0.201803080745-r.jar:4.11.0.201803080745-r]
{noformat}
This would seem to be an issue with the SSH known_hosts.
{noformat}
Caused by: org.eclipse.jgit.errors.UnsupportedCredentialItem:
ssh://[email protected]:22:
org.eclipse.jgit.transport.CredentialItem$YesNoType:The authenticity of host
'mali.corp.sensis.com' can't be established.{noformat}
Yet I am able to push just fine from the command line.. SSH is quite happy with
the configuration and i am not prompted to add the host to KNOWN_HOSTS. It is
already there.
{noformat}
[root@sensis-90076 eids-registry]# pwd
/var/lib/nifiregistry/git/eids-registry
[root@sensis-90076 eids-registry]# ls
FAA_Terminal_Procedures_Publications hi
[root@sensis-90076 eids-registry]# git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
git config --global push.default simple
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
[email protected]'s password:
Counting objects: 34, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (30/30), done.
Writing objects: 100% (30/30), 3.18 KiB | 0 bytes/s, done.
Total 30 (delta 12), reused 0 (delta 0)
To [email protected]:eids-registry.git
35c4861..72fd26c master -> master
[root@sensis-90076 eids-registry]#
{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)