git回购问题相关傀儡

问题描述:

我是git世界新人,最近我开始部署木偶。我打算在git版本控制中放置傀儡。我下面木偶的食谱,做以下git回购问题相关傀儡

[email protected]:/etc/puppet# git init 
Initialized empty Git repository in /etc/puppet/.git/ 
[email protected]:/etc/puppet# git add manifests/ modules/ 
[email protected]:/etc/puppet# git commit -m "initial commit" 
[master (root-commit) c7a24cf] initial commit 
59 files changed, 1790 insertions(+), 0 deletions(-) 
create mode 100644 manifests/site.pp 
create mode 100644 manifests/utils.pp 

当我运行以下命令,我得到这个错误。什么是命令要做?

[email protected]:/etc/puppet# git push -u origin master 
fatal: 'origin' does not appear to be a git repository 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

我该如何连接到git并在我的客户端或其他地方签出我的回购?

+0

'git remote -v'输出什么? – Agis

+0

git remote -v'empty'输出 – Satish

你必须告诉混帐其中远程仓库位于:

git remote add origin <url-of-remote> 

编辑:origin仅仅是你的主要远程的传统名字,很像master是你的主分支。

+0

''?像这个'git:// myserver /' – Satish

+0

@Satish这取决于你推/拉的服务器的配置。示例网址可以是:'[email protected]:myapp/myapp.git'或'https:// mydomain.com/myapp/myapp.git' – Agis

+0

'myapp.git' ??我没有在任何地方定义它?我怎么知道我的情况是什么名字?或在哪里定义?对不起,因为我不清楚完整的URL – Satish

如果你已经在/ etc/puppet文件夹中完成了一个git init,它已经是'origin'了,你不必推送。

我想你只是想将文件添加到主分支。你已经完成了你的提交。试试git log