本文介绍了将GitHub连接到Shiny服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我试图用 Dean Attali手册。到目前为止,我让闪亮的服务器工作。这应该通过以下事实来证明:当我导航到服务器IP时,出现欢迎使用Shiny服务器页面。问题是,我无法像我在本手册的步骤8.2中那样将闪亮的服务器连接到GitHub。我现在尝试了几次,但是我得到了这个错误信息: 是我的代码: sudo apt-get -y install git cd / srv / shiny-server git init echo#shiny-server>> README.md git commit -m第一次提交 git config --global user.emailuser@user.com git config --global user.namegituser git remote add origin git@github.com:gituser / shiny-server.git 电子邮件地址user@user.com和用户名gituser只是假的。 我已经在GitHub的存储库设置中部署了适配密钥。 希望你能帮助我!在此先感谢:) 解决方案 git init echo#shiny-server>> README.md git commit -m第一次提交 git add ,将 README.md 添加到Git中。 如果没有 git add 步骤, git commit 什么都不做。因此,存储库没有任何提交,因此没有任何推送,导致您观察到的错误。 这样它就会work: git init echo#shiny-server>> README.md git add --all git commit -m第一次提交 I am trying to set up a shiny server with the manual of Dean Attali. So far I made the shiny server work. This should be proofed by the fact that the "Welcome to Shiny Server" page shows up when I navigate to the server ip. The problem is that I cannot connect my shiny server to GitHub like in step 8.2 of the manual. I tried it a several times now, but I am getting this error message:This is my code:sudo apt-get -y install gitcd /srv/shiny-servergit initecho "# shiny-server" >> README.mdgit commit -m "first commit"git config --global user.email "user@user.com"git config --global user.name "gituser"git remote add origin git@github.com:gituser/shiny-server.gitThe email address "user@user.com" and the user name "gituser" are just dummies.I already deployed the fitting key in the repository settings in GitHub.Hope that you can help me! Thanks in advance :) 解决方案 There is a step missing here:The missing step is a git add, to add the README.md to Git.Without the git add step, git commit did nothing. As such, the repository doesn't have any commits, and therefore there's nothing to push,resulting in the error that you observed.This way it will work:git initecho "# shiny-server" >> README.mdgit add --allgit commit -m "first commit" 这篇关于将GitHub连接到Shiny服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-14 18:10
查看更多