Jav*_*ner 3 git github git-bash
我朋友在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 commit, working directory clean
Run Code Online (Sandbox Code Playgroud)
和
$ git push -u origin master:master
Enter passphrase for key '/h/.ssh/id_rsa':
ERROR: Repository not found.
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)
要么
$ git push origin master
Enter passphrase for key '/h/.ssh/id_rsa':
ERROR: Repository not found.
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)
他们中的大多数都有相同的问题(以前的Stack Overflow问题/答案),但原因不同,并尝试过这些答案,但无法修复错误,请给我指示,谢谢!
Von*_*onC 11
经过聊天,配置与GitHub上的链接的正确方法是:
cd c:\Users\ramas\dmsproject\dms
git remote set-url origin git@github.com:vamsiannem/dms.git
Run Code Online (Sandbox Code Playgroud)
然后一个git push可以工作.
| 归档时间: |
|
| 查看次数: |
9393 次 |
| 最近记录: |