2014-12-11 3 views
3

bower를 사용하여 프로젝트에 종속성 및 다양한 라이브러리를 설치하고 있습니다. 하지만 치명적인 오류가 발생합니다. 의 URL의 자식 : // 부분은 내가 맥 OS X 및 명령에 대한 터미널을 사용하고Bower install Libraries 문제

하는 것은 아니고 로 대체 될 것으로 보인다.

어떤 해결책이 있습니까?

pdc1-4s6zyr1:~ administrator$ bower install **git://github.com/jquery/jquery.git** 
bower not-cached git://github.com/jquery/jquery.git#* 
bower resolve  git://github.com/jquery/jquery.git#* 
bower ECMDERR  Failed to execute "git ls-remote --tags --heads git://github.com/jquery/jquery.git", exit code of #128 

Additional error details: 
fatal: '.insteadofgithub.com/jquery/jquery.git' does not appear to be a git repository 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

감사합니다, ANKIT 타나

+0

bower.json을 게시 할 수 있습니까? – ianaya89

답변

3

은 터미널을 열고이 쓰기 :

git config --global url."https://".insteadOf git:// 

이 강제로 자식이 프로토콜을 대체합니다.

또한 bower.json에 github repos를 포함하는 경우 'git : //'을 파일의 git URL의 'https : //'로 바꿀 수 있습니다.

+0

그것은 작동하지 않았다. 여전히 동일한 오류가 표시됩니다. git 설정을 완전히 제거하는 방법을 알고 있습니까? –

+0

@AnkitTanna ~/.gitconfig 파일을 찾아서 모든 설정을 제거 할 수 있습니다. bower 파일에 문제가있을 수 있습니까? – ianaya89

+1

안녕하세요. 문제는 URL 중 하나에 빈 값이있는 것입니다. 방금 https [url "https : //"] –

2

문제에 대한 해결책은 다음과 같습니다

가 .gitconfig 파일

[user] 
     name = 1wQasdTeedFrsweXcs234saS56Scxs5423 
     email = [email protected] 
    [credential] 
     helper = osxkeychain 
    [url ""] 
     insteadOf = git:// 
    [url "https://"] 
    [url "https://"] 
     insteadOf = git:// 
찾기

빈 URL = "HTTPS를"= URL로 교체 "가 될 것이다 : //"

[user] 
    name = 1wQasdTeedFrsweXcs234saS56Scxs5423 
    email = [email protected] 
[credential] 
    helper = osxkeychain 
[url "https://"] 
    insteadOf = git:// 
[url "https://"] 
[url "https://"] 
    insteadOf = git:// 

이 작동합니다 :)

해피

을 바우어 - 보내고