标签: git-clone

无法克隆网络驱动器上的GIT存储库

使用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)

windows git version-control tortoisegit git-clone

6
推荐指数
2
解决办法
6771
查看次数

gitlab:git clone https with big repos失败

当尝试通过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 git-clone gitlab

6
推荐指数
1
解决办法
1万
查看次数

作为更大项目的一部分,将 Github 存储库分叉到另一个存储库中

也许我在这里遗漏了一些东西,但我已经看过并且想做一些看起来很简单的事情,但我还没有弄清楚(或找到某人)如何完成它。

  • 我有一个项目,我发现了一个 Github 存储库,其中包含我想用作其中一部分的内容。
  • 我想将该 repo 的内容分叉到我的项目中(另一个 repo)
  • 我希望 fork 的连接在原始文件发生更改的情况下保持不变(否则我只会简单地在开头复制/粘贴——此外,我希望可以选择发出拉取请求)。

我试图简单地git clone https://github.com/dave/repository_of_dave.git(和变体),但仍然与 Dave 的 repo 中的所有内容有关。复制/粘贴是进入这里的唯一方法吗?

git github git-clone git-fork

6
推荐指数
1
解决办法
5462
查看次数

Ruby - kernel_require.rb:54 in ‘require’:无法加载此类文件(来自 GitHub 存储库)

我克隆了一个 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)

ruby open-source github pacman git-clone

6
推荐指数
1
解决办法
1万
查看次数

关于远程操作的 git 服务器信息或 ascii(克隆)

如何配置我的 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)

git ascii splash-screen git-clone

6
推荐指数
1
解决办法
316
查看次数

如何防止克隆我的 github 存储库?

我试图找到一种方法来防止从 github 存储库克隆,例如,我有一个私有存储库,有些人在公司计算机上工作,团队中的每个人都设置了授权级别。

当我在 github 上为某个用户设置授权时,存储库可以在他/她自己的 github 帐户上使用,因为从任何地方都获得了授权,因此可以查看和执行所需的操作。

如何避免有人在您自己的计算机上克隆存储库?试着找出某人出于某种原因计划离开公司,但在此之前你好/她克隆公司存储库以在其他地方使用。由于我删除权限后他/她将无法在远程进行更改,因此避免克隆将解决我的安全问题。

git privacy github git-clone

6
推荐指数
1
解决办法
4962
查看次数

GIT 克隆无法获取以点开头的文件(.htaccess、.htpasswd)

我正在使用 GIT 从 Github 克隆一个存储库,在运行 CentOs 的远程环境中,使用:

git clone https://myuser:mypass@github.com/Myrepository/repo.git
Run Code Online (Sandbox Code Playgroud)

并且正在检查所有文件,除了以点开头的文件

.htaccess .htpasswd

笔记:

  1. 丢失的文件显示在 Github 存储库中

github

  1. 这些文件不包含在 .gitignore 中
  2. 我正在使用ls -a命令列出服务器上的文件

服务器

我是否需要添加任何标志才能签出这些文件?


[解决方案]

问题不在于 git clone 命令,丢失的点文件是由于之后执行的另一个命令

mv /path/one/* /path/two
Run Code Online (Sandbox Code Playgroud)

它移动了除点文件之外的所有内容。

感谢您的回复!

git github git-clone

6
推荐指数
1
解决办法
3770
查看次数

漫游器/蜘蛛会克隆公共git存储库吗?

我在GitHub上托管了一些公共存储库,这些存储库有时会根据流量图接收克隆。尽管我想相信很多人都在寻找并下载我的代码,但是其中一些代码的性质使我怀疑这些克隆中的大多数都来自机器人或搜索引擎爬虫/蜘蛛。我自己知道,如果我通过搜索引擎找到git存储库,通常会在浏览器中查看代码,并在克隆之前确定该代码是否有用。

有谁知道克隆git仓库是否是搜索引擎爬虫的标准技术,或者我的代码是否比我想象的更受欢迎?

git search github web-crawler git-clone

6
推荐指数
1
解决办法
388
查看次数

连接后从代理收到 HTTP 代码 501

每当我尝试从 bitbucket 克隆存储库时,它都会给我以下错误:

致命:无法访问“ https://user_name@bitbucket.org/user_name/repo_name.git/ ”:CONNECT 后从代理收到 HTTP 代码 501

无法理解是什么问题。我正在git clone从 bitbucket 存储库 web复制命令。我也设置了 githttp.proxy但它没有用。

如果需要更多信息,请告诉我。

谢谢

git proxy bitbucket git-clone git-bash

6
推荐指数
1
解决办法
5201
查看次数

请求的URL返回错误502,公司?

有人知道问题出在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)

git git-clone

6
推荐指数
3
解决办法
2万
查看次数