Help with cloning a repo from github
已回答
I'm trying to clone a repo from github and having problems with IDEA 2017.3.4 ultimate (Linux). I've configured a token on github with all repo permissions and IDEA seems happy to login with it. But when I get to the checkout dialog it fails with:
Clone failed: Unable to find remote helper for 'https'
What's even more annoying is IDEA is forgetting my token every time I try to use the checkout. Meaning I have to regenerate new ones.


2018-02-09 17:02:56,688 [25540261] INFO - #git4idea.commands.GitHandler - Cloning into 'docs-to-pdf-converter'...
2018-02-09 17:02:56,700 [25540273] INFO - #git4idea.commands.GitHandler - fatal: Unable to find remote helper for 'https'
2018-02-09 17:03:25,710 [25569283] WARN - github - Couldn't get the list of GitHub repositories;
org.jetbrains.plugins.github.exceptions.GithubOperationCanceledException: Can't get valid credentials
at org.jetbrains.plugins.github.util.GithubUtil.lambda$getValidAuthData$3(GithubUtil.java:180)
at org.jetbrains.plugins.github.util.GithubAuthDataHolder.runTransaction(GithubAuthDataHolder.java:40)
at org.jetbrains.plugins.github.util.GithubUtil.getValidAuthData(GithubUtil.java:166)
at org.jetbrains.plugins.github.util.GithubUtil.runTask(GithubUtil.java:111)
at org.jetbrains.plugins.github.util.GithubUtil.runTask(GithubUtil.java:80)
at org.jetbrains.plugins.github.extensions.GithubCheckoutProvider.lambda$doCheckout$1(GithubCheckoutProvider.java:56)
at org.jetbrains.plugins.github.util.GithubUtil$1.compute(GithubUtil.java:277)
at com.intellij.openapi.progress.Task$WithResult.run(Task.java:326)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:713)
at com.intellij.openapi.progress.impl.CoreProgressManager$5.run(CoreProgressManager.java:397)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:157)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:543)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:488)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:575)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:315)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
请先登录再写评论。
Ok if replace https: with git: in the url it works? Is the forgetting of the token every time a feature? the help docs suggest the password auth will keep nagging you but the token won't?well it doesn't say it will so implies it shouldn't. Keeps prompting me for another token, without restarting the IDE.
fatal: Unable to find remote helper for 'https'The error is returned by git, seems something is missing. See e.g. https://stackoverflow.com/questions/8329485/unable-to-find-remote-helper-for-https-during-git-clone
Switching to git:// protocol works because the corresponding helper is present.
Also, note that you are trying to clone a public repository - thus no authentication is needed to do so.
> Meaning I have to regenerate new ones.
You could generate a token on GitHub manually and save it somewhere, to be able to use it if something happens without the need to generate a new one.
>Keeps prompting me for another token
Have you tried configuring token directly in Settings | Version Control | GitHub?
Could be some issues accessing keychain to save the token, if it is configured as the store in Passwords settings. There should be exceptions in the log, though.
Using settings to set the token works a little better. When set there it's good for a IDEA session, but as soon as I close IDEA and restart the IDE - it's forgotten and starts asking for tokens again.
This is using the Linux keyring? I still have lot of problems with that integration on the svn side (IDEA-159045) every time I tell IDEA to remember a svn password the IDE crashes. I know I disabled the keyring from the svn configuration side - but that shouldn't have changed git support?
But if integration isn't working on my distro? I guess I'm lucky the runtime didn't seg fault.
It could use either keyring or KeePass DB. Check the settings at Settings | Appearance & Behavior | System Settings | Passwords, configure it to store passwords in KeePass if needed.
Accessing keyring on Linux could have various issues (should not result in java segfault though, the issue you are referring to is caused by the third-party SVNKit, as I understand)
Ah on the passwords page it was configured to "do not save" is that the default? it's possible I changed it to that while struggling with IDEA-159045. I do remember also having problems with the database tool and storing/remembering passwords for databases. Though as you say it's not a segfault unlike the ones from using svn.
However if change the password persistence to save to native keyring I get an error 'Cannot access native keychain' on startup. Which I think relates to:
Does it matter what impl of keepass I install? just looking at yum I have two choices: keepassx and keepassx2 which seem to be 1.0 and 2.0. Both of these will likely be a couple of years out-of-date.
Seems the library is not installed, or IDE could not find it.try installing libsecret-1-0,
Also see https://youtrack.jetbrains.com/v2/issue/IDEA-164296
>Does it matter what impl of keepass I install?
Basically, IDE does not need KeePass implementation installed in the system. It will automatically create a DB and save passwords in there.
You might system implementation only if you want to manually edit the DB. AFAIK, both keepassx and keepassx2 will work, so it is up to you.
There's no libsecret-1-0 in yum it seems:
I'll try keepass, good to know I don't need to install. Guess that's why it warns it employs only weak encryption on your stored passwords.
Could be a different version for your distro.
Check https://pkgs.org/download/libsecret
distro not listed - I'm using CentOS 6, its a company supplied KVM image, I have limited control over.
I am not familiar with differences between CentOS 6 and CentOS 7, but I think the lib for CentOS 7 should work.
Anyway, the KeePass workaround should work for you.
For what it's worth the libsecret centos7 packages all required a later version of glibc. Which isn't possible to update couldn't find any natively compiled versions for RHEL 6/CentOS 6.
Keepass format does work. But it's incredibly slow, takes like a minute showing a processing spinner whenever I open a database table when using the keepass store.