How do I resolve macOS Carthage freezing when launching an update?
A lot of what I did to solve my problems can be found elsewhere, but none of the sites had it all. In the end, I used a technique that I didn't find, but I guessed.
The root issue I had was adopting the recommended protection for my github account: 2-step authentication and passphrase for ssh. Both can be handled, but unfortunately Cathage does not offer a "verbose" option for the user to determine what git commands he is running - an option that will really help the user when they hang. In my case (and perhaps most others) the root problem is that the git command that Carthage runs wants to prompt the user for something, and Carthage has closed or redirected stdout.
1) Sierra and git account / passwords
It seems like a recent release in the Sierra Tor has changed how git credentials are cached. The correct way to do this now is to use a keychain. The git control procedure for using Keychain is here . Note that this method only works for pure account / password authentication.
Before trying Carthage, insure you can use
the terminal to make sure everything is in order.
2) Two-Step Verification
In this case, you need to use an authentication token . This token is used instead of the git password. Again, make sure you can clone the appropriate repository before trying Carthage.
3) Passphrase for ssh access
If git uses ssh (as it might in submodules), then git will try to ask for a passphrase, and since Carthage is suppressing, you will be left hanging. By adding a line to your file
(and do it in the BOTTOM of the file)
Host * UseKeychain yes
git will also use Keychain to store and retrieve the passphrase . You need to do this once through the terminal to enter it into the keychain.
4) Still stuck?
If the above methods do not help you when Carthage opens a new terminal window and starts
ps -aef | grep git
; then you will see several git commands. Hope you see a team
like me; copy this command to your clipboard.
Kill the Carthage command, then paste the line into Terminal and run the command (perhaps editing it to remove extraneous options) and see what happens. If you're lucky to find it, this will help you fix your problem.
source to share