相关疑难解决方法(0)

无法Git-push master到Github - 'origin'似乎不是git存储库/权限被拒绝

这个问题与我理解rebase,分支和合并以及问题有关

如果您的远程列表中有teamMate,您如何提交您的github帐户?

我发现其他人也有同样的问题.问题似乎与/etc/xinet.d/有关.

问题:无法将我的本地分支推送到Github的主分支

我跑

git push origin master
Run Code Online (Sandbox Code Playgroud)

我明白了

fatal: 'origin' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)

错误消息告诉我分支'origin'不在我的本地git存储库中.这样,Git就会停止连接到Github.

这很奇怪,因为我没有删除分支'origin'.

我的git树是

  dev
* master
  ticgit
  remotes/Math/Math
  remotes/Math/master
  remotes/origin/master
  remotes/Masi/master
Run Code Online (Sandbox Code Playgroud)

当你在当地的Git中拥有teamMate的分支时,如何将你的本地分支推送到Github


VonC的答案解决了主要问题.我把一个passphares放到我的ssh键上.

我跑

$git push github master     
Run Code Online (Sandbox Code Playgroud)

我明白了

Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)

似乎我需要以某种方式为Git提供密码.

你怎么能让Github问你的密码而不是依赖ssh密钥?

git version-control push

83
推荐指数
3
解决办法
11万
查看次数

设置Jenkins时权限被拒绝(publickey)

我在Win 2008服务器计算机上设置Jenkins,并且在配置Jenkins以连接到GitHub时遇到一些麻烦.我收到以下错误:

Command "git.exe fetch -t git@github.com:USER/REPO.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: Permission denied (publickey).
fatal: The remote end hung up unexpectedly

ERROR: Could not fetch from any repository
FATAL: Could not fetch from any repository
hudson.plugins.git.GitException: Could not fetch from any repository
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:950)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:908)
    at hudson.FilePath.act(FilePath.java:758)
    at hudson.FilePath.act(FilePath.java:740)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:908)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1184)
    at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:537)
    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:425)
    at hudson.model.Run.run(Run.java:1376)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:175)
Run Code Online (Sandbox Code Playgroud)

我检查过的事情

  • Jenkins服务在我的用户名下运行.
  • 我更改了SSH密钥,因此它不再有密码.
  • 我通过使用msysgit执行与Jenkins相同的命令验证了我的SSH密钥是否有效.
  • 验证我的所有路径都是正确的.

Jenkins配置设置

  • 詹金斯1.418
  • GitHub插件0.5
  • Git插件1.1.9

msysgit工作,但CMD提示不会 当我导航到有效的仓库并从DOS提示符执行命令时,它也会失败. …

windows git github jenkins

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

标签 统计

git ×2

github ×1

jenkins ×1

push ×1

version-control ×1

windows ×1