2014-03-28 27 views
0

我剛剛安裝了Node/NPM/Yeoman在全新安裝的OS X 10.9.2上。 Xcode工具都已安裝。我拉下了一個當前項目的存儲庫,並運行bower install來安裝依賴項。輸出看起來是這樣的:奇怪的鮑爾/ Git錯誤(錯誤代碼#128,不能chdir到'Y:/')

bower angular#1.2.6   not-cached git://github.com/angular/bower-angular.git#1.2.6 
bower angular#1.2.6   resolve git://github.com/angular/bower-angular.git#1.2.6 
bower json3#~3.2.6   not-cached git://github.com/bestiejs/json3.git#~3.2.6 
bower json3#~3.2.6    resolve git://github.com/bestiejs/json3.git#~3.2.6 
bower es5-shim#~2.1.0  not-cached git://github.com/es-shims/es5-shim.git#~2.1.0 
bower es5-shim#~2.1.0   resolve git://github.com/es-shims/es5-shim.git#~2.1.0 
bower jquery#~1.10.2  not-cached git://github.com/jquery/jquery.git#~1.10.2 
bower jquery#~1.10.2   resolve git://github.com/jquery/jquery.git#~1.10.2 
bower bootstrap#~3.0.3  not-cached git://github.com/twbs/bootstrap.git#~3.0.3 
bower bootstrap#~3.0.3   resolve git://github.com/twbs/bootstrap.git#~3.0.3 
bower angular-resource#1.2.6  not-cached git://github.com/angular/bower-angular-resource.git#1.2.6 
bower angular-resource#1.2.6   resolve git://github.com/angular/bower-angular-resource.git#1.2.6 
bower angular-route#1.2.6   not-cached git://github.com/angular/bower-angular-route.git#1.2.6 
bower angular-route#1.2.6    resolve git://github.com/angular/bower-angular-route.git#1.2.6 
bower angular-file-upload#0.4.1 not-cached git://github.com/nervgh/angular-file-upload.git#0.4.1 
bower angular-file-upload#0.4.1  resolve git://github.com/nervgh/angular-file-upload.git#0.4.1 
bower angular-mocks#1.2.6   not-cached git://github.com/angular/bower-angular-mocks.git#1.2.6 
bower angular-mocks#1.2.6    resolve git://github.com/angular/bower-angular-mocks.git#1.2.6 
bower angular-scenario#1.2.6  not-cached git://github.com/angular/bower-angular-scenario.git#1.2.6 
bower angular-scenario#1.2.6   resolve git://github.com/angular/bower-angular-scenario.git#1.2.6 
bower angular-mocks#1.2.6    ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/angular/bower-angular-mocks.git", exit code of #128 

Additional error details: 
fatal: Could not chdir to 'Y:/': No such file or directory 

有趣的是,該ECMDERR上的變化我每次運行bower install時間,這似乎表明,它不是導致錯誤的特定包時包。

我發現了幾個不同的人在從防火牆後面克隆時遇到錯誤#128的問題。它有been suggested,這可以通過運行git config --global url."https://".insteadOf git://來修復,以便告訴git使用HTTPS作爲協議而不是git,但這並沒有解決我的問題。更令人困惑的是fatal: Could not chdir to 'Y:/': No such file or directory。我坦率地不知道這是從哪裏來的。它似乎只在我運行某些git命令時出現,如ls-remote

此外,我可以通過SSHHTTPS成功手動克隆。這個錯誤只發生在鮑爾。

有沒有人有任何建議如何解決這個問題?我搜查了很多,並一直無法找到任何其他提及它。任何幫助將非常感激!

+0

原來,這與我的項目位於通過「SMB」本地安裝的網絡驅動器上有關。當我在本地複製項目並運行命令時,它工作正常。我需要尋找一種更好的方式來使用Git訪問samba股票。如果任何人有任何想法,我肯定對他們開放。 – inerd89

回答

0

我剛剛嘗試使用角種子時發生同樣的錯誤。

但是我的解決方案是不將項目移動到本地磁盤(該項目已經是本地的)。作爲一個替代的問題,運行

npm install 

當我第一次安裝了涼亭命令,然後使用亭子直接安裝到安裝涼亭包。有一個緩存清理中間好的措施。

sudo npm install -g bower 
bower cache clean 
bower install 

希望這會有助於緩解對他人的挫折感。

2

我也有這個問題。對我來說,解決辦法是添加到存儲庫配置

[url "https://"] 
    insteadOf = git:// 

文件在YOUR_REPO/git的/配置

不是在全局配置,如:

git config --global url."https://github.com/".insteadOf [email protected]: 
git config --global url."https://".insteadOf git:// 
0

有同樣的問題,我加入

[url "https:"] 
    insteadOf = git: 

到YOUR_REPO /。混帳/配置的伎倆,HTTPS沒有雙斜線

0

這是因爲在一個代理環境包括HTTP和HTTPS首選,所以不是

"devDependencies": { 

    "file-loader": "^0.8.4", 
    "gh-pages": "git://github.com/markdalgleish/gh-pages#cli-message", 

    } 

使用HTTPS

"devDependencies": { 

     "file-loader": "^0.8.4", 
     "gh-pages": "Https://github.com/markdalgleish/gh-pages#cli-message", 

     } 
替換它

或者你可以在全球範圍內設置你的回購

祝你好運!