ㄷㅣㅆㅣ's Amusement

How to use private git repository under carthage. on Mac OS 본문

Programming/iOS

How to use private git repository under carthage. on Mac OS

ㄷㅣㅆㅣ 2017. 8. 22. 17:53

How to use private git repository under carthage. on Mac OS

Private git repository in carthage.



If you add 'private git' to Cartfile, You can see the error above.

1
2
3
4
DCs-OfficePC:temp childc$ carthage update
*** Cloning TempProject
A shell task (/usr/bin/env git clone --bare --quiet https://<YOUR_ID>@<URL_OF_REPOSITORY>/<PROJECT_NAME>.git /Users/<YOUR_DIRECTORY>) failed with exit code 128:
fatal: could not read Password for 'https://<YOUR_ID>@<URL_OF_REPOSITORY>': terminal prompts disabled
cs


This error, "failed with exit code 128: fatal: could not read Password: terminal prompts disabled", can be solved easily.

You can make git to ask your password on gui. (because of "--quiet" option, you cannot input password through terminal)



First of all, You should install latest version of git.

1
2
3
4
5
#if you already installed git
brew upgrade git
 
#else
brew install git
cs


(opt. If you didn't install "homebrew" yet -> https://brew.sh)

1
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
cs



Then, You can just type this.

1
2
3
4
5
6
7
8
# backup previous git
sudo mv /usr/bin/git /usr/bin/old_git
 
# symbolic link
sudo ln -/usr/local/Cellar/2.14.1/bin/git /usr/bin/git
 
# add gui-askpass to global config.
git config --global core.askpass /usr/local/Cellar/git/2.14.1/libexec/git-core/git-gui--askpass
cs



Ta-Da~~

1
2
3
4
5
6
DCs-OfficePC:temp childc$ carthage update
*** Cloning TempProject
*** Checking out TempProject at "*********************************"
*** xcodebuild output can be found in /var/folders/84/0jl8rgfn119fch90y5ymhtb00000gn/T/carthage-xcodebuild.M97aQf.log
*** Building scheme "**********" in <<YOUR_PROJECT>>.xcworkspace
 
cs


0 Comments
댓글쓰기 폼