我正在尝试将内容从工作站推送到服务器.但它给了我一个错误.请查看以下命令和错误:
Administrator@ganesh ~/testing
$ git push origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 241 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: ENV GL_RC not set
remote: BEGIN failed--compilation aborted at hooks/update line 20.
remote: error: hook declined to update refs/heads/master
To git@ganesh:repositories/testing
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'git@ganesh:repositories/testing'
Run Code Online (Sandbox Code Playgroud)
看来我需要设置环境变量GL_RC.是这样吗?
这里的任何人都可以告诉我问题可能是什么以及我如何解决它?我在Windows Server 2003上使用gitolite.
我有一个Windows 7和一个Windows Server 2012奴隶,Jenkins代理和Cygwin已经设置好了.我想避免Cygwin,只使用Git for Windows附带的Git Bash shell(我认为它叫做msysgit).所以我重命名C:\cygwin64为C:\cygwin64.bak,C:\cygwin64\bin从路径中删除,然后重新启动.
Windows 2012框现在运行正常,(Unix)shell脚本运行$OSTYPE = msys,和uname = MSYS_NT-6.3(表明Git Bash shell正在运行).
Windows 7框不会运行任何内容,并给出以下错误:
远程构建在工作区C:\ Users\Jenkins\workspace\TEST
[win7] $ sh -xe C:\ Users\jenkins\AppData\Local\Temp\hudson5047939025129374618.sh
系统找不到指定的文件
FATAL:命令执行
java.io.IOException 失败:无法运行程序"sh"(在目录"C:\ Users\Jenkins\workspace\TEST"中):CreateProcess
error = 2,系统找不到指定的文件.
在java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
所以我的问题是,如何配置Jenkins使用C:\Program Files\Git\bin\sh.exe或C:\Program Files\Git\usr\bin\bash.exe运行shell脚本?
继当上安装回购Android开源项目的说明为使用Git,运行后repo init命令,我碰到这个错误:
/ c/Users/Andrew Rabon/bin/repo:第23行:exec:python:未找到
我已经下载了回购并将其放入,~/bin就像它说的那样,我已经安装好了Python.我想知道问题是什么.
作为参考,我使用msysgit的Windows Vista,我的理解msysgit是有限的,但我希望它至少能拉android源码.
我正在尝试使用CopSsh,PuTTY和msysgit在Windows 7上设置Git服务器.我在使用ssh克隆存储库时遇到问题.
如果我使用常规目录路径,它的工作原理:
$ git clone ~/vc/git/depot/test.git/ /c/dev/es/app
Initialized empty Git repository in c:/dev/es/app/.git/
warning: You appear to have cloned an empty repository.
Run Code Online (Sandbox Code Playgroud)
Ssh,不起作用.我尝试了不同的路径而没有成功.
$ git clone ssh://steve@test:4837/~/vc/git/depot/test.git/ /c/dev/es/app
Initialized empty Git repository in c:/dev/es/app/.git/
fatal: '~/vc/git/depot/eastApp.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)
我按照这里的说明进行操作:http://www.timdavis.com.au/git/setting-up-a-msysgit-server-with-copssh-on-windows/
有线索吗?
当我尝试使用我最喜欢的工具TortoiseGit推送到我的远程仓库(Unfuddle)时,我收到以下错误.然后我打开GitGUI并且能够毫无问题地推送.我通过一些谷歌搜索收集了一些选美需要为一些PuTTY变种运行,并且它正在运行.我下一步去哪儿看?
没有可用的支持身份验证方法(服务器已发送:publickey)
我真的很享受我的时间与git.
我正在使用我认为非常相似的设置的2台机器上运行
在我的笔记本上
当我SomeCommand从CLI 输入"Git help "时,我的笔记本电脑在我的浏览器中启动了html帮助,我可以自由阅读我询问的任何帮助元素.
在我的桌面上
CLI响应就像是要执行相同操作,但没有切换到浏览器并且没有启动任何帮助
我该怎么做才能让我的帮助回到桌面上?
注意:我正在通过console2运行bash shell,但是这个问题似乎影响了默认的bash shell,它也可以通过explorer中的上下文菜单运行.
我在Windows 7上运行Git-1.8.0-preview20121022,安装时只使用"Git Bash"(对Windows cmd最少侵入).
当我从开始菜单快捷方式打开Git Bash时,历史记录一切正常.
但是当Git Bash here上下文菜单(git-cheetahshell扩展一个或更简单的注册表)是启动会话的时候,来自该会话的命令不会保存到.bash_history.
怎么能搞清楚为什么会这样?或者更好的是,有人知道如何解决这个问题吗?
我正在使用该_netrc文件存储客户端凭据以进行基本身份验证,并注意到msysgit始终截断第63个字符的用户名.
这是我的%HOME%\_netrc样子:
# username for local repos
machine localhost
login 12345678901234567890123456789012345678901234567890123456789012345
password secret
Run Code Online (Sandbox Code Playgroud)
我已经定义了65个字符的用户名.
然后我尝试克隆存储库:
C:\work>git clone https://localhost:44305/git myrepo
Run Code Online (Sandbox Code Playgroud)
这是输出(带GIT_CURL_VERBOSE=1和GIT_SSL_NO_VERIFY=true):
Cloning into 'myrepo'...
* About to connect() to localhost port 44305 (#0)
* Trying 127.0.0.1... * connected
* Connected to localhost (127.0.0.1) port 44305 (#0)
* successfully set certificate verify locations:
* CAfile: C:\Program Files (x86)\Git/bin/curl-ca-bundle.crt CApath: none
* 0x214a410 is at send pipe head!
* Expire cleared
* SSL connection using …Run Code Online (Sandbox Code Playgroud) 更多信息:
git-bash shell中的命令按预期工作
在git-bash shell中,调用Git\bin\git.exe
Git\bin是sh.exe所在的地方
在PowerShel(或cmd或tcc)中,调用Git\cmd\git.exe
即使将Git\bin添加到PATH(在Git\cmd之后),脚本也不起作用
很沮丧......
看来.exe文件实现的所有git命令都有效:git-fetch.exe,git-merge.exe,git-push.exe等.
它显示为脚本来实现的所有命令不工作:
Git\libexec\git-core\git-pull
Git\libexec\git-core\git-rebase
Run Code Online (Sandbox Code Playgroud)
等等,无论git.exe调用什么运行libexec\git-core脚本似乎都被吓倒了......
我们再来一次......"git pull"横向走了(很确定它昨天正常工作):
I:\Work\bitbucket\PluralSight\proj1 [work2]> git stat
On branch work2 nothing to commit, working directory clean
I:\Work\bitbucket\PluralSight\proj1 [work2]> git fetch
Password for 'https://user@bitbucket.org':
I:\Work\bitbucket\PluralSight\proj1 [work2]> git pull
*fatal: 'pull' appears to be a git command, but we
were not able to execute it. Maybe git-pull is broken?*
I:\Work\bitbucket\PluralSight\proj1 [work2]>
Run Code Online (Sandbox Code Playgroud)
我已经卸载/重新安装了msysgit.我在PowerShell和cmd.exe中得到相同的结果.
[work]> git rebase master
fatal: 'rebase' appears to be …Run Code Online (Sandbox Code Playgroud) 该文件夹包含有类似的文件名的文件abc~1,123~1,a1d2~3.
当我这样做git add --all时说,
$ git add --all
error: Invalid path 'abc~1.png'
error: unable to add abc~1.png to index
fatal: adding files failed
Run Code Online (Sandbox Code Playgroud)
我做了一次试验和错误,我发现只有当波形符号后跟一个数字时,这个错误仍然存在.
如果第一次通过git跟踪文件夹,Git也不会跟踪其他文件.
$ git clean --dry-run
Would remove Rest.png
Would remove abc~1.png
Run Code Online (Sandbox Code Playgroud)
请帮助我如何解决此问题.