Started working on a new project where I need to run "Carthage update" for a mix of private and public projects some of which have submodules. No matter what I do Carthage hangs with no indication of why. What can I do to determine the hangs, and then how do I fix those problems?
相关问题
- How to add working directory to deployment in GitH
- Upload file > 25 MB on Github
- Can I input Git command in Android Studio IDE?
- Source tree not able to push
- Git lost local commited files after git checkout
相关文章
- java开发bug问题:GitHub授权登录无法获取授权账号信息?
- Is there a Github markdown language identifier for
- “no implicit conversion of Integer into String” er
- GitHub:Enterprise post-receive hook
- git commit directory
- travis-ci setup releases with --github-token
- git commit gives error: empty commit set passed
- github部署的网站,引用的js文件报404
Much of what I did to solve my problems can be found elsewhere, but no one site had it all. In the end I used a technique that I did not find but guessed at.
The root problem I had was adopting recommended security protection for my github account: two stage authentication and a passphrase for ssh. Both of these can be worked around, but unfortunately Cathage offers no "verbose" option to let a user determine what git commands it's executing - an option that would really help the user when it hangs. In my case (and probably most others) the root problem is that a git command run by Carthage wants to prompt the user for something, and Carthage has closed or redirected standard output.
1) Sierra and Git account/passwords
It seems that a recent Sierra point release changes how git credentials are cached. The proper way to do this now is using the Keychain. The procedure on how to direct git to use the Keychain is found here . Note that this technique only works for pure "account/password" authentication.
Before even trying Carthage, insure you can use
git clone
from the terminal to be sure all is well.2) Two-step authentication
In this case, you need to use an authentication token. That token is used in place of the git password. Again, insure you can clone an appropriate repository before trying Carthage.
3) Passphrase for ssh access
If git uses ssh (as it may with sub-modules), then git will attempt to prompt for the passphrase, and as Carthage suppresses that you'll be left hanging. By adding a line to your
~/.ssh/config
file (and do this at the BOTTOM of the file)git will also use the Keychain for saving and retrieving the passphrase. You need to do this once via the Terminal to get it entered into the Keychain.
4) Still stuck?
If the above techniques don't help you, when Carthage hangs open a new terminal window and run
ps -aef | grep git
; what you'll then see are a few git commands. Hopefully you will see agit clone
command as I did; copy that command to the clipboard.Kill the Carthage command, then paste the line in Terminal and run the command (perhaps by editing it to remove extraneous options), and see what happens. With luck what you find will help you resolve your problem.