我在GitHub上有一个现有的Rails应用程序,并部署在Heroku上。我正在尝试建立一个新的开发机器,并从我的GitHub存储库中克隆了这个项目。然而,我对如何将此文件夹链接到Heroku感到困惑。最初,我使用heroku创建命令,但显然我这次不想这样做,因为它将创建另一个heroku实例。
当前回答
您可能应该启动ssh代理并添加密钥。检查一下,
http://wordgraphs.com/post/5000/Heroku--Permission-denied--publickey---fatal--Could-not-read-from-remote-repository-
它帮助了我。
其他回答
别忘了,如果你也在一台以前没有设置heroku的机器上
heroku keys:add
否则你将无法推动或拉动回购。
用于现有存储库
键入终端
$heroku git:remote-示例
使用heroku的叉子
使用新的“heroku fork”命令!它将复制所有环境,之后您必须更新github repo!heroku fork-源应用程序目标应用程序将其克隆到本地git克隆git@heroku.com:youamazingapp.git在github上创建新的repo并添加它git远程添加原点https://github.com/yourname/your_repo.git推上githubgit推送原始主机
我在github和heroku中有我的项目,用于上传heroku:
heroku git:remote -a <project>
文件是:
https://devcenter.heroku.com/articles/git
heroku login
git init
heroku git:remote -a app-name123
然后检查远程回购:
git remote -v
推荐文章
- 为什么我需要显式地推一个新分支?
- 如何撤消最后的git添加?
- Rubymine:如何让Git忽略Rubymine创建的.idea文件
- Gitignore二进制文件,没有扩展名
- Git隐藏错误:Git隐藏弹出并最终与合并冲突
- 如何隐藏数据库,我不允许访问
- 了解Git和GitHub的基础知识
- 没有。Git目录的Git克隆
- Git与Mercurial仓库的互操作性
- 忽略git中修改(但未提交)的文件?
- “git restore”命令是什么?“git restore”和“git reset”之间有什么区别?
- Git合并与强制覆盖
- Git拉另一个分支
- 在Bash命令提示符上添加git分支
- 如何更改Git日志日期格式