2015-12-09 233 views
2

我在我的筆記本電腦上安裝了Windows 10 x64,然後使用最新的Git(Git-2.6.3-64-bit)。正如我在筆記本電腦上看到的,Git現在安裝在以下目錄中:C:\Users\MyPC\AppData\Local\Programs\Git(我沒有機會指定另一個特定的文件夾,因爲它在Git安裝期間自動完成)。已經選擇「使用Git從Windows命令提示符」和「使用OpenSSH」已被選中,Windows路徑更新與Git目錄。畢竟,問題在於,Windows無法識別Git要撥打的位置。我試過git --version,但從Windows無法識別。Windows 10無法識別Git

我的問題是(在Windows 10 Pro x64上):
1.我們可以爲Git指定另一個安裝文件夾嗎?
2.在Git dir/bin中,沒有ssh.exe,而在OpenSSH選擇對話框中,它告訴我「這使用了Git附帶的ssh.exe」。那麼,它在哪裏,內置的SSH客戶端?
3.我懷疑現在Windows 10不接受安裝在%USERPROFILE%/ AppData上的任何外部程序以包含到系統路徑中。這是對的嗎?
4.如何讓Windows「看」Git?

+0

確保git.exe是您添加到您的路徑 –

+0

的文件夾中我有同樣的問題,以更新後的git用於Windows 10上的windows 2.6.3。 ''''git'''安裝在'''C:\ Users \ MyPC \ AppData \ Local \ Programs \ Git'''而不是 '''C:\ Program文件\ Git'''。
問題是混帳仍試圖訪問裏面的東西'''C:\ Program Files文件\ Git'''文件夾:

 C:\projects\test>git clone https://github.com/foo/bar Cloning into 'bar'... fatal: unable to access 'github.com/foo/bar.git/';: error setting certificate verify locations: CAfile: C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt CApath: none 
Etienne

回答

0
  1. 我們可以爲Git指定另一個安裝文件夾嗎?

嘗試以管理員身份運行安裝程序,以便它可以安裝到Program Files。我不知道如何指定自定義路徑。

  • 在GIT中DIR/bin中,有沒有ssh.exe,而在OpenSSH的選擇對話框,它告訴我 「這使用ssh.exe附帶GIT中」。那麼,它在哪裏,內置的SSH客戶端?
  • 一些挖掘告訴我,它可能生活在Git的安裝.ssh文件夾內,這樣C:\Users\MyPC\AppData\Local\Programs\Git\.ssh

  • 我懷疑,現在的Windows 10不接受%USERPROFILE%/ AppData上安裝的任何外部程序以包含在系統路徑中。這是對的嗎?
  • AFAIK您可以添加任何目錄到您的路徑。

    1. 如何讓Windows「看」Git?

    添加C:\Users\MyPC\AppData\Local\Programs\Git到您的路徑:

    Start the System Control Panel applet (Start - Settings - Control Panel - System). 
    Select the Advanced tab. 
    Click the Environment Variables button. 
    Under System Variables, select Path, then click Edit. 
    You'll see a list of folders, as this example for my system shows: C:\Program Files\Windows Resource Kits\Tools\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Support Tools\;C:\Program Files\Common Files\Roxio Shared\DLLShared;C:\Program Files\Common Files\Ulead Systems\MPEG;C:\Program Files\Intel\DMIX;C:\Program Files\Executive Software\Diskeeper\;C:\Program Files\Bonjour\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Misc 
    You can add additional folders that you want to include in searches. I add a "C:\program files\misc" entry into which I place my standalone utilities, instead of copying them into C:\windows. Click OK. 
    You'll need to restart the processes (e.g., command prompt) that use the system path to see the added folders. 
    

    http://windowsitpro.com/systems-management/how-can-i-add-new-folder-my-system-path

    +0

    感謝@Pablo感謝你的解釋。在檢查筆記本電腦的狀態後,我看到: 1. Git安裝中沒有'.ssh'文件夾 2.我嘗試將一些可執行文件放在'%USERPROFILE%/ AppData'中,但它仍然不能由Windows認可 3.我已將Git路徑添加到系統變量,但仍然無效。 –

    +1

    1.「試圖以管理員身份安裝Git」不能解決問題,我很擔心。 – Etienne