2017-06-22 33 views
0

我在Heroku上創建了一個應用程序。該應用程序被推送到我的[email protected]:[My-project-name] .git。如何在我的個人Github帳戶上推送我的Heroku應用程序?

我想推這個應用程序到我自己的Github帳戶。我該怎麼做?

順便說一句,這樣做的:

git clone [email protected]:[My-project-name].git 

還給:

Permission denied (publickey). 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 

回答

0

如果你已經到Heroku的帳戶。使用下面的命令,而不是複製現有的應用程序到本地機器:

heroku git:clone -a your_app_name 
cd your_app_name 

這將克隆在當前工作目錄的應用程序,然後導航到your_app_name。然後你就可以添加你的github回購的遙控器:

git remote add origin url_to_your_github_repo 

最後運行下面的命令來推動代碼github上:

git push origin master 
相關問題