相关疑难解决方法(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万
查看次数

git推送到远程存储库"无法从远程存储库读取"

我搜索了一会儿,但我无法找到解决问题的方法.

我有一个服务器,我可以通过ssh连接到用户名git和本地git存储库.
现在我想将本地存储库推送到服务器上新创建的存储库.

这是我做的:

  • 在中创建了一个git存储库 /home/git/test.git
  • 将存储库初始化为裸机
  • 在本地计算机上添加了远程存储库
    git remote add test ssh://git@serverIp:/home/git/test.git
  • 现在我执行了push命令:
    git push test master

我总是得到

fatal: could not read from remote repository

Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)

我正在使用本地Windows 7机器,并希望上传到Linux服务器.
我可以通过ssh与git用户登录.我也尝试以root相同的结果作为用户(使事情工作一次).
我永远不会被问到ssh password.

我真的不知道我做错了什么.
在你称之为副本之前,我搜索了很多这个问题,似乎没有人谈论同样的问题.

更新:

  • "哪个git"返回/ usr/bin/git
  • PATH echo包含/ usr/bin
  • id_rsa和id_rsa.pub文件都已设置并带有passphrase
  • ssh git @ serverIp git-receive-pack也能正常工作并返回/ usr/bin/git-receive-pack
  • ssh git @ serverIp ls /home/git/test.git有效
  • 所有相关目录都是chmod 755
  • git是存储库的所有者
  • auth.log文件在尝试的push命令中没有新条目
  • GIT_TRACE = 2 git …

git ssh repository git-remote

31
推荐指数
3
解决办法
9万
查看次数

Git服务器的主机密钥未缓存在注册表中 - GitHub.com

这里继续问题:我正在尝试在GitHub上建立我的第一个Git存储库.(注意,这意味着我不能使用putty,我正在使用openssh,或者至少我应该这样,而且我认为我是).我一直在这里关注GitHub网站上的文档.直到最后一个命令,我才把所有事情都弄清楚:git push -u origin master.它给了我以下错误:

The server's host key is not cached in the registry.
You have no guarantee that the server is the computer you think it is.
The server's rsa2 key fingerprint is: ssh-rsa 2048
16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
Connection abandoned. fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)

我猜这意味着在我的known_hosts文件中找不到他们的ssh-rsa密钥,但我不确定如何解决这个问题.我试过ssh -T git@github.com,我登录就好了.我也尝试关闭git bash并重新打开,以防它出现缓存问题.这不能解决问题.这是我得到的唯一输出与文档指示的不同.我希望能够建立一个甜蜜的Java Helper库,所以任何帮助都将不胜感激!

git ssh bash github

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

使用R将本地存储库推送到Windows上的github

我曾经问过一个非常相似的问题并得到了一个从命令行起作用的响应,但我现在想用R来自动化Windows的过程(Linux更容易).

这是我正在尝试做的事情:

  1. 创建本地目录(或已存在)
  2. 在云中生成一个与本地同名的新github仓库(基于此答案)
  3. 将.git添加到本地存储库
  4. 进行初始提交
  5. 建立云回购和本地回购之间的联系
  6. 将提交和本地存储库中的文件推送到github

我相信基于输出,我在失败之前一直到第5步(因为提交和本地目录中的文件永远不会转到云中的github).我知道第2步有效,因为这里创建了空仓库.我不知道如何测试第5步.在最后一步,shell(cmd6, intern = T)RGui和RStudio导致永恒的死亡螺旋.问题是:如何将提交和本地存储推送到云端.

这是我更新的代码(用户特定的唯一内容是第三代码块中的用户名和密码):

## Create Directory
repo <- "foo5"
dir.create(repo)
project.dir <- file.path(getwd(), repo) 

## Throw a READ.ME in the directory
cat("This is a test", file=file.path(project.dir, "READ.ME"))

## Github info (this will change per user)
password <-"pass" 
github.user <- "trinker"  

## Get git location
test <- c(file.exists("C:/Program Files (x86)/Git/bin/git.exe"),
    file.exists("C:/Program Files/Git/bin/git.exe"))
gitpath <- c("C:/Program Files (x86)/Git/bin/git.exe",
  "C:/Program …
Run Code Online (Sandbox Code Playgroud)

windows git r github-api

15
推荐指数
1
解决办法
1417
查看次数

使用GIT Bash,ERROR:找不到存储库 - 致命:无法从远程读取

我朋友在Git存储库中的项目,下载了'Git-1.9.4-preview20140929.exe'并安装了GIT bash将项目拉到我的最后,我用它做了

$ git clone <with SSH clone URL>
Run Code Online (Sandbox Code Playgroud)

我在我的本地系统中得到了这个项目,现在我做了一些改动,我想把更改推回到存储库,所以我做了

$ git init
Reinitialized existing Git repository in c:/users....
Run Code Online (Sandbox Code Playgroud)

$ git add .
$ pom.xml
./pom.xml: line 1: project: No such file or directory
./pom.xml: line 2: syntax error near unexpected token `newline'
./pom.xml: line 2: `  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http
://maven.apache.org/maven-v4_0_0.xsd">'
Run Code Online (Sandbox Code Playgroud)

 $ git commit -m 'First commit'
 On branch master
 Your branch is ahead of 'origin/master' by 2 commits.
   (use "git push" to publish your local commits)

 nothing to …
Run Code Online (Sandbox Code Playgroud)

git github git-bash

3
推荐指数
1
解决办法
9393
查看次数

标签 统计

git ×5

github ×2

ssh ×2

bash ×1

git-bash ×1

git-remote ×1

github-api ×1

push ×1

r ×1

repository ×1

version-control ×1

windows ×1