这个问题与我理解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密钥?
我搜索了一会儿,但我无法找到解决问题的方法.
我有一个服务器,我可以通过ssh连接到用户名git和本地git存储库.
现在我想将本地存储库推送到服务器上新创建的存储库.
这是我做的:
/home/git/test.gitgit remote add test ssh://git@serverIp:/home/git/test.gitgit 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.
我真的不知道我做错了什么.
在你称之为副本之前,我搜索了很多这个问题,似乎没有人谈论同样的问题.
更新:
这里继续问题:我正在尝试在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库,所以任何帮助都将不胜感激!
我曾经问过一个非常相似的问题并得到了一个从命令行起作用的响应,但我现在想用R来自动化Windows的过程(Linux更容易).
这是我正在尝试做的事情:
我相信基于输出,我在失败之前一直到第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) 我朋友在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 ×5
github ×2
ssh ×2
bash ×1
git-bash ×1
git-remote ×1
github-api ×1
push ×1
r ×1
repository ×1
windows ×1