Support Questions

Find answers, ask questions, and share your expertise
Celebrating as our community reaches 100,000 members! Thank you!

Why is NIFI Registry Sync to GIT failing

Rising Star

I've set up a nifi-registry.. and a GIT server to store my versioned flows in. I've changed my nifi-registry providers.xml to use a GIT flowPersistenceprovider

        <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>

I've also cloned the repository seen in the Flow Storage Directory property

[root@sensis-90076 conf]# cd /var/lib/nifiregistry/git/eids-registry/
[root@sensis-90076 eids-registry]# git status
# On branch master
nothing to commit, working directory clean
[root@sensis-90076 eids-registry]#

I see the following errors (tail -f nifi-registry-app.log) when I try to save a flow

2018-10-16 10:54:49,462 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: remote hung up unexpectedly
org.eclipse.jgit.api.errors.TransportException: remote hung up unexpectedly
        at ~[org.eclipse.jgit-]
        at org.apache.nifi.registry.provider.flow.git.GitFlowMetaData.lambda$startPushThread$1( ~[nifi-registry-framework-0.3.0.jar:0.3.0]
        at java.util.concurrent.Executors$ ~[na:1.8.0_181]
        at java.util.concurrent.FutureTask.runAndReset( ~[na:1.8.0_181]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301( ~[na:1.8.0_181]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ ~[na:1.8.0_181]
        at java.util.concurrent.ThreadPoolExecutor.runWorker( ~[na:1.8.0_181]
        at java.util.concurrent.ThreadPoolExecutor$ ~[na:1.8.0_181]
        at ~[na:1.8.0_181]
Caused by: org.eclipse.jgit.errors.TransportException: remote hung up unexpectedly
        at org.eclipse.jgit.transport.TransportGitSsh$SshPushConnection.<init>( ~[org.eclipse.jgit-]
        at org.eclipse.jgit.transport.TransportGitSsh.openPush( ~[org.eclipse.jgit-]
        at org.eclipse.jgit.transport.PushProcess.execute( ~[org.eclipse.jgit-]
        at org.eclipse.jgit.transport.Transport.push( ~[org.eclipse.jgit-]
        at ~[org.eclipse.jgit-]
        ... 8 common frames omitted
Caused by: org.eclipse.jgit.errors.UnsupportedCredentialItem: ssh:// org.eclipse.jgit.transport.CredentialItem$YesNoType:The authenticity of host '' 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( ~[org.eclipse.jgit-]
        at org.eclipse.jgit.transport.CredentialsProviderUserInfo.promptYesNo( ~[org.eclipse.jgit-]
        at com.jcraft.jsch.Session.checkHost( ~[jsch-0.1.54.jar:na]
        at com.jcraft.jsch.Session.connect( ~[jsch-0.1.54.jar:na]
        at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession( ~[org.eclipse.jgit-]
        at org.eclipse.jgit.transport.SshTransport.getSession( ~[org.eclipse.jgit-]
        at org.eclipse.jgit.transport.TransportGitSsh$SshPushConnection.<init>( ~[org.eclipse.jgit-]
        ... 12 common frames omitted


Rising Star

Follow up detail.. I have no problem doing a git push from the command line. This tells me that the failure is strictly within the nifi-registry.

[root@sensis-90076 eids-registry]# pwd
[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)'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)
   35c4861..72fd26c  master -> master
[root@sensis-90076 eids-registry]#