Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从Matlab推送本地git存储库失败:无法推送到git://github.com/user/repo.git 使用https://github.com/user/repo.git_Git_Matlab_Github - Fatal编程技术网

从Matlab推送本地git存储库失败:无法推送到git://github.com/user/repo.git 使用https://github.com/user/repo.git

从Matlab推送本地git存储库失败:无法推送到git://github.com/user/repo.git 使用https://github.com/user/repo.git,git,matlab,github,Git,Matlab,Github,我最近开始使用GitHub,因为我想与同事分享一些Matlab代码。然而,我似乎无法通过Git集成将我的更改推送到在线存储库。 我已经尝试使用SVN集成和Git集成git://github.com/user/repo.git 没有成功 每次从源代码管理菜单中选择Push时,我都会收到以下错误消息: git://github.com/user/repo.git: 你不能强迫自己git://github.com/user/repo.git 使用 切换到SVN并使用会导致另一个错误:无法打开git u

我最近开始使用GitHub,因为我想与同事分享一些Matlab代码。然而,我似乎无法通过Git集成将我的更改推送到在线存储库。 我已经尝试使用SVN集成和Git集成git://github.com/user/repo.git 没有成功

每次从源代码管理菜单中选择Push时,我都会收到以下错误消息: git://github.com/user/repo.git: 你不能强迫自己git://github.com/user/repo.git 使用

切换到SVN并使用会导致另一个错误:无法打开git upload pack

我已经走到了我能找到的每一条路的尽头。有没有人有过类似的问题?我正在使用Matlab2016b开发MacBookPro

谢谢。

以下是修复它的方法:

我可以通过Matlab设置本地Git存储库,方法是转到“源代码管理”>“管理文件”,然后选择Git集成或使用命令行语法 用于此操作的地址为git://github.com/username/repository.git 通过Matlab还是通过终端

2按照说明为您的系统设置SSH密钥

3如果在第2步中还没有这样做,请将Git存储库源代码更改为SSHgit@github.com:用户名/存储库使用
git远程设置url源git@github.com:username/repository.git

似乎你没有权利推送。您的用户名和电子邮件int-git-config是否与github上的匹配?您是回购协议的所有者吗?为什么要使用SVN集成?这是Git回购。@PTRK谢谢,是的,这是我的存储库。我刚刚更新了用户名和电子邮件,但仍然收到相同的错误,无法使用git://推送,应该使用https://@SamRoberts。我想使用git源代码管理。我尝试了SVN,因为Matlab一直告诉我使用https链接,它只在SVNI中有效。我不认为这是真的。您通常可以使用带有Git的https链接。