使用Windows 7,我们在网络驱动器上设置了一个裸GIT存储库,以便多个用户可以从中拉/推.我能够在我的本地和多个其他网络驱动器上创建一个新的工作仓库.但是,当我尝试在同一网络驱动器(不同的文件夹)上克隆新的工作存储库时,它会失败.
使用TortoiseGIT,在我右键单击并选择"GIT Clone"后,将所有必要的路径放入我的裸仓库(新的工作仓库已经填写)并点击确定,我收到以下错误:
Cloning into 'R:\path\to\new\repo'... done.
error: refs/remotes/origin/master does not point to a valid object!
error: Trying to write ref refs/heads/master with nonexistent object 5d2164db2c61efc7a5598f6ff75ed3fbbb12456e
fatal: Cannot update the ref 'HEAD'.
fatal: The remote end hung up unexpectedly git did not exit cleanly (exit code 128)
Run Code Online (Sandbox Code Playgroud)
它无法创建回购.但它确实构建了新文件夹&".git"子文件夹结构.
这不是ar/w权限问题,因为我可以删除任何其他文件,但似乎无法创建这个新克隆的repo.我的同事也不能.即使我到了网络驱动器上的另一个文件夹,我仍然无法成功克隆repo.令人惊讶的是,如果我只是复制/粘贴我在另一个位置创建的仓库,然后手动执行"拉动",它可以正常工作和更新.
关于下一步尝试的任何想法?显然我已经用Google搜索"退出代码128"和"无法更新参考'HEAD'",但无法找到我的问题的解决方案.这可能是我们忽略的非常简单的东西,但我们刚刚开始使用GIT,这真的让我们感到头痛......
更新:我刚注意到当我从GIT手动拉到我的"副本"时,它正在进行快进.也许这提供了一些额外的线索?
From R:/path/to/repo
* branch master -> FETCH_HEAD
Updating 5d2164d..d75bdb7
Fast-forward
Files.py | 3 +++
1 file changed, 3 insertions(+)
Success
Run Code Online (Sandbox Code Playgroud) 当尝试通过https克隆大型仓库(~700MB)时,git失败:
c:\git-projects>git clone https://git.mycompany.de/fs.git
Cloning into 'fs'...
Username for 'https://git.mycompany.de': mwlo
Password for 'https://mwlo@git.mycompany.de':
efrror: RPC failed; result=22, HTTP code = 500
atal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)
克隆ssh作品:
c:\git-projects>git clone git@git.mycompany.de:fs.git
Cloning into 'fs'...
remote: Counting objects: 144564, done.
remote: Compressing objects: 100% (30842/30842), done.
remote: Total 144564 (delta 95360), reused 143746 (delta 94542)
Receiving objects: 100% (144564/144564), 601.34 MiB | 1.33 MiB/s, done.
Resolving deltas: 100% (95360/95360), done.
Checking out files: 100% (4649/4649), done.
Run Code Online (Sandbox Code Playgroud)
使用https克隆较小的存储库也有效:
c:\git-projects>git clone …Run Code Online (Sandbox Code Playgroud) 也许我在这里遗漏了一些东西,但我已经看过并且想做一些看起来很简单的事情,但我还没有弄清楚(或找到某人)如何完成它。
我试图简单地git clone https://github.com/dave/repository_of_dave.git(和变体),但仍然与 Dave 的 repo 中的所有内容有关。复制/粘贴是进入这里的唯一方法吗?
我克隆了一个 GitHub 目录,因为我想帮助一个开源项目。
下面列出了该项目的链接,因此您可以随意尝试一下。
https://github.com/tupini07/RubyMan
根据自述文件,我做了以下
git clone https://github.com/tupini07/RubyMan
cd projects/RubyMan
ruby main.rb
Run Code Online (Sandbox Code Playgroud)
编辑
我通过运行 gem install win32console 解决了第一个问题,但我仍然遇到了同样的问题。
错误信息
C:\Users\darkmouse\Documents\Projects\RubyMan>ruby main.rb
C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in
`require': cannot load such file -- 2.0/Console_ext (LoadError)
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/win32console-1.3.2-x86-mingw32/
lib/Win32/Console.rb:12:in `rescue in <top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/win32console-1.3.2-x86-mingw32/
lib/Win32/Console.rb:8:in `<top (required)>'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/win32console-1.3.2-x86-mingw32/
lib/Win32/Console/ANSI.rb:13:in `<top (required)>'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/win32console-1.3.2-x86-mingw32/
lib/win32console.rb:1:in `<top (required)>'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:128:in `require'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:39:in `require'
from …Run Code Online (Sandbox Code Playgroud) 如何配置我的 git 服务器以在远程操作(例如 clone )上显示附加信息或 ascii 艺术?
示例将在此页面上,如下所示。
F:\>git clone https://myserver/tfs/DefaultCollection/_git/Proj
Username for 'https://myserver': domain\username
Password for 'https://domain\username@myserver':
remote:
remote: fTfs
remote: fSSSSSSSs
remote: fSSSSSSSSSS
remote: TSSf fSSSSSSSSSSSS
remote: SSSSSF fSSSSSSST SSSSS
remote: SSfSSSSSsfSSSSSSSt SSSSS
remote: SS tSSSSSSSSSs SSSSS
remote: SS fSSSSSSST SSSSS
remote: SS fSSSSSFSSSSSSf SSSSS
remote: SSSSSST FSSSSSSFt SSSSS
remote: SSSSt FSSSSSSSSSSSS
remote: FSSSSSSSSSS
remote: FSSSSSSs
remote: FSFs (TM)
remote:
remote: Microsoft (R) Visual Studio (R) Team Foundation Server
remote:
Receiving objects: 100% (6781/6781), 47.12 MiB …Run Code Online (Sandbox Code Playgroud) 我试图找到一种方法来防止从 github 存储库克隆,例如,我有一个私有存储库,有些人在公司计算机上工作,团队中的每个人都设置了授权级别。
当我在 github 上为某个用户设置授权时,存储库可以在他/她自己的 github 帐户上使用,因为从任何地方都获得了授权,因此可以查看和执行所需的操作。
如何避免有人在您自己的计算机上克隆存储库?试着找出某人出于某种原因计划离开公司,但在此之前你好/她克隆公司存储库以在其他地方使用。由于我删除权限后他/她将无法在远程进行更改,因此避免克隆将解决我的安全问题。
我正在使用 GIT 从 Github 克隆一个存储库,在运行 CentOs 的远程环境中,使用:
git clone https://myuser:mypass@github.com/Myrepository/repo.git
Run Code Online (Sandbox Code Playgroud)
并且正在检查所有文件,除了以点开头的文件
.htaccess .htpasswd
笔记:

ls -a命令列出服务器上的文件
我是否需要添加任何标志才能签出这些文件?
[解决方案]
问题不在于 git clone 命令,丢失的点文件是由于之后执行的另一个命令
mv /path/one/* /path/two
Run Code Online (Sandbox Code Playgroud)
它移动了除点文件之外的所有内容。
感谢您的回复!
我在GitHub上托管了一些公共存储库,这些存储库有时会根据流量图接收克隆。尽管我想相信很多人都在寻找并下载我的代码,但是其中一些代码的性质使我怀疑这些克隆中的大多数都来自机器人或搜索引擎爬虫/蜘蛛。我自己知道,如果我通过搜索引擎找到git存储库,通常会在浏览器中查看代码,并在克隆之前确定该代码是否有用。
有谁知道克隆git仓库是否是搜索引擎爬虫的标准技术,或者我的代码是否比我想象的更受欢迎?
每当我尝试从 bitbucket 克隆存储库时,它都会给我以下错误:
致命:无法访问“ https://user_name@bitbucket.org/user_name/repo_name.git/ ”:CONNECT 后从代理收到 HTTP 代码 501
无法理解是什么问题。我正在git clone从 bitbucket 存储库 web复制命令。我也设置了 githttp.proxy但它没有用。
如果需要更多信息,请告诉我。
谢谢
有人知道问题出在git哪里吗?运行(tfs)的git clone克隆运行时出现此错误team foundation server。
fatal: unable to access 'http://website.com/_git/project': The requested URL returned error: 502
Run Code Online (Sandbox Code Playgroud)