gpt4 book ai didi

linux - git repo 问题相关的 puppet

转载 作者:太空宇宙 更新时间:2023-11-04 09:41:16 25 4
gpt4 key购买 nike

我是 git 世界的新手,最近我开始部署 puppet。我打算将 puppet 放入 git 版本控制中。我正在关注 puppet 的食谱并进行以下操作

root@cookbook:/etc/puppet# git init
Initialized empty Git repository in /etc/puppet/.git/
root@cookbook:/etc/puppet# git add manifests/ modules/
root@cookbook:/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

当我按照命令运行时出现此错误。命令要做什么??

root@cookbook:/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 并在我的客户端或其他地方检查我的仓库?

最佳答案

你必须告诉 git 远程仓库的位置:

git remote add origin <url-of-remote>

编辑:origin 只是您主远程的常规名称,很像 master 是您的主分支。

关于linux - git repo 问题相关的 puppet ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21141666/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com