Connection issue with github.com when downloading Jenkinsfile

Hi
Our company, partially migrate to the Github.com. Jenkinsfiles are stored in the Github. On the Github side, there are configured github app with private keys. I don’t know how, because I don’t have access.
On the Jenkins side, I have them added to the credentials as Github App. Test connection from credentials successfully: Success, Remaining rate limit: 14856
Sometimes Jenkins has a problem with connection to the github to download a Jenkinsfile:

hudson.plugins.git.GitException: Command "git fetch --tags --progress --prune origin +refs/heads/master:refs/remotes/origin/master" returned status code 128:
 stdout: 
 stderr: ssh_exchange_identification: Connection closed by remote host
 fatal: Could not read from remote repository.
 
 Please make sure you have the correct access rights
 and the repository exists.
 
 	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2734)
 	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2111)
 	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:87)
 	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:623)
 	at jenkins.plugins.git.GitSCMFileSystem$BuilderImpl.build(GitSCMFileSystem.java:406)
 	at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:219)
 	at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:191)
 	at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:174)
 	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:118)
 	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:70)
 	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
 	at hudson.model.ResourceController.execute(ResourceController.java:101)
 	at hudson.model.Executor.run(Executor.java:442)
 Finished: FAILURE

I cannot find anything about in logs, in the system /var/log/jenkins/jenkins.log or https://jenkins_url/log/
The problem occurs with https and ssh connection.
Nothing alarming in the company’s firewall logs.

How can I inform Jenkins to be more verbose when getting jenkinsfile from github? Or how else can I trace where the problem is occurring. From the Jenkins or system side.

BR, Piotr

There is also another error:

13:15:26  hudson.plugins.git.GitException: Command "git fetch --tags --progress --prune origin +refs/heads/master:refs/remotes/origin/master" returned status code 128:
13:15:26  stdout: 
13:15:26  stderr: fatal: repository 'https://github.com/our-org/project.git/' not found
13:15:26  
13:15:26  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2734)
13:15:26  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2111)
13:15:26  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:87)
13:15:26  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:623)
13:15:26  	at jenkins.plugins.git.GitSCMFileSystem$BuilderImpl.build(GitSCMFileSystem.java:406)
13:15:26  	at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:219)
13:15:26  	at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:191)
13:15:26  	at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:174)
13:15:26  	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:118)
13:15:26  	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:70)
13:15:26  	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
13:15:26  	at hudson.model.ResourceController.execute(ResourceController.java:101)
13:15:26  	at hudson.model.Executor.run(Executor.java:442)
13:15:26  Finished: FAILURE

The worst thing is that this does not always occur, but has appeared for some time.