简体   繁体   English

Windows中的git shell错误

[英]git shell error in Windows

Split-Path : 找不到驱动器。名为“.C”的驱动器不存在。
所在位置 C:\Users\Administrator\AppData\Local\GitHub\PoshGit_a2be688889e1b24632e83adccd9b2a44b91d655b\profile.example.p
s1:1 字符: 16
+ Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent)
+                ~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (.C:String) [], DriveNotFoundException
    + FullyQualifiedErrorId : DriveNotFound

Import-Module : 未能加载指定的模块“.\posh-git”,因为在任何模块目录中都没有找到有效模块文件。
所在位置 C:\Users\Administrator\AppData\Local\GitHub\PoshGit_a2be688889e1b24632e83adccd9b2a44b91d655b\profile.example.p
s1:4 字符: 1
+ Import-Module .\posh-git
+ ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (.\posh-git:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

Pop-Location : 找不到驱动器。名为“.C”的驱动器不存在。
所在位置 C:\Users\Administrator\AppData\Local\GitHub\PoshGit_a2be688889e1b24632e83adccd9b2a44b91d655b\profile.example.p
s1:23 字符: 1
+ Pop-Location
+ ~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (.C:String) [], DriveNotFoundException
    + FullyQualifiedErrorId : DriveNotFound

Start-SshAgent : 找不到驱动器。名为“.C”的驱动器不存在。
所在位置 C:\Users\Administrator\AppData\Local\GitHub\PoshGit_a2be688889e1b24632e83adccd9b2a44b91d655b\profile.example.p
s1:25 字符: 1
+ Start-SshAgent -Quiet
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (.C:String) [], DriveNotFoundException
    + FullyQualifiedErrorId : DriveNotFound

图片

  1. I have installed Github for Windows but when I open the git shell, many things go wrong. 我已经Github for Windows安装了Github for Windows但是当我打开git shell时,很多事情出错了。

  2. I tried to reinstall it, but nothing has changed. 我试图重新安装它,但没有任何改变。

  3. When I changed the github for windows -Options -Default shell to Git Bash ,everything is OK. 当我将适用于Windowsgithub -Options -Default shell更改为Git Bash时 ,一切正常。

I am not sure of the version of Git you were using (or of your %PATH%) but using the latest portable Git should work: 我不确定您使用的Git版本(或您的%PATH%),但使用最新的便携式Git应该可以:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM