我正在试图找出克隆第三方库(来自Janrain的engage.iphone)到我自己的应用程序目录结构的正确方法,这种方式可以让我提取最新的更改并将它们与我在本地进行的任何更改合并.我还希望第三方库(与我的更改合并)在我推送它时包含在我自己的应用程序的git repo中.
结构将是这样的:
myApp/ <- this is my app, which is its own git repo
external/
engage.iphone/ <- this is the 3rd party library I want to keep up-to-date
mySource1.h
mySource2.m
...
Run Code Online (Sandbox Code Playgroud)
如何安全地以这种方式设置它?在它成立之后,是否有任何特殊的流程可以在以后合并?
我正在尝试克隆Github上的存储库,但我收到了SSL证书问题.
$ git clone https://github.com/HonzaKral/django-threadedcomments.git
Initialized empty Git repository in /Users/Bryan/work/django-threadedcomments/.git/
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/HonzaKral/django-threadedcomments.git/info/refs
fatal: HTTP request failed
Run Code Online (Sandbox Code Playgroud)
如何安装相应的证书?
编辑:我完全可以通过使用git://与https://来避免这个问题
当我尝试用cygwin上的git克隆时,我遇到了问题.我的GIT_SSH是
"C:\ProgramFiles(x86)\Git\bin\".
Run Code Online (Sandbox Code Playgroud)
当我尝试克隆时,结果如下:
$ git clone ssh://*****/home/local/git/prestashop myDirectory
Cloning into 'myDirectory'...
error: cannot spawn C:\ProgramFiles(x86)\Git\cmd\: No such file or directory
fatal: unable to fork
Run Code Online (Sandbox Code Playgroud)
我已经看到很多与该问题相关的问题,但我找不到解决这个问题的答案.欢迎所有想法!谢谢 !
我正在使用Android项目,我厌倦了这个错误:
fatal: unable to access 'https://github.com/caddy2519/MyBabyGrowing.git/': Failed connect to github.com:443; No error
我该如何解决?
我不使用代理服务器.
我不确定这是否是一个愚蠢的问题,但有没有任何不良的副作用来做一个git clone已经克隆另一个远程存储库的存储库?
我想获得linux内核2.6.22.19源代码来为我的路由器交叉编译东西,但是如果我做的话,repo是巨大的(3gb)
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Run Code Online (Sandbox Code Playgroud)
然后看看那个标签,克隆花了很长时间,我的带宽是有限的.
如果我跑这个
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git --branch v2.6.22.19 --single-branch
Run Code Online (Sandbox Code Playgroud)
收到的文件大小约为150mb,这是正确的做法,这个命令是什么意思?v2.6.22.19是标签名称对吗?为什么它可以加床后 - 分支?
克隆后.
[oglop@localhost linux-stable]$ git status
# Not currently on any branch.
Run Code Online (Sandbox Code Playgroud) 我使用Bitbucket(git)服务器,目前git clone随机挂起.同样的回购有时会被克隆,有时会意外地挂起然后超时.服务器内存,CPU利用率,磁盘空间都很好.请告知可能需要注意的其他区域以找到根本原因.这发生在5个不同的Jenkins从站上,因此它不限于单个服务器.
以下是错误日志:
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "/usr/bin/git -c core.askpass=true fetch --tags --progress http://bitbucket.net/project.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: remote: Counting objects: 2506, done.
stdout:
stderr: remote: Counting objects: 2506, done.
remote: Compressing objects: 0% (1/2405)
remote: Compressing objects: 1% (25/2405)
remote: Compressing objects: 2% (49/2405)
remote: Compressing objects: 3% (73/2405)
remote: Compressing objects: 4% (97/2405)
remote: Compressing objects: 5% (121/2405)
remote: Compressing objects: 6% (145/2405)
remote: Compressing objects: 7% (169/2405)
remote: Compressing objects: …Run Code Online (Sandbox Code Playgroud) 我分叉了一个私人存储库,我被邀请进行协作,但每次尝试使用HTTPS进行克隆时,都会收到以下错误消息:
$ git clone https://github.com/usernamex/privat-repo.git
cloning into 'privat-repo'...
Username for 'https://github.com':usernamex
Password for 'https://usernamex@github.com':
remote: Repository not found.
fatal: repository 'https://github.com/usernamex/privat-repo.git/' not found
Run Code Online (Sandbox Code Playgroud)
Note: 'usernamex' and 'privat-repo' are just examples
这是我尝试过的一些没有成功的事情:
download ZIP按钮访问repo URL并通过浏览器下载其内容.git clone和git push.事实上,我可以在我的帐户中克隆并推送其他(公共)存储库.我通过终端在mac上运行git 2.10,正如我所提到的,我对HTTPS的解决方法不感兴趣(例如:SSH或GitHub桌面).
任何想法为什么会这样?
我正在尝试使用用户名和密码克隆一个存储库,如下所示:
git clone https://username:password@gitlab.com/user/repo.git
Run Code Online (Sandbox Code Playgroud)
但是我收到此错误:
fatal: unable to access 'https://username:password@gitlab.com/user/repo.git': Illegal port number
Run Code Online (Sandbox Code Playgroud)
我正在尝试在使用AWS Linux的EC2实例上执行此操作.如果我手动完成,我可以使用它,并且只使用克隆中的用户名,然后将密码放入提示符,但我正在尝试使用bash脚本克隆存储库.
有没有可能从 GitHub 克隆不完整的存储库,而只是克隆选定的分支?我发现可以使用命令进行单分支克隆:
git克隆git@github/path/to/repository.git --branch my_branch_1 --single-branch
所以想实现这样的目标:
git克隆git@github/path/to/repository.git --branch my_branch_1 --branch my_branch_2 --single-branch ??
这意味着只有其中两个。问题是,这样的存储库在主分支中相当大,开发人员不需要。他们只需要分支my_branch_1和my_branch_2。开发人员应该从这些分支创建他们的 dev 分支,然后在 GitHub 上向master拉取请求。
也许可以通过 git Remote add 或类似的东西。但我内部可能不太熟悉 Git 的概念。