将GitHub连接到Shiny服务器 [英] Connecting GitHub to Shiny Server

查看:238
本文介绍了将GitHub连接到Shiny服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用 Dean Attali手册。到目前为止,我让闪亮的服务器工作。这应该通过以下事实来证明:当我导航到服务器IP时,出现欢迎使用Shiny服务器页面。问题是,我无法像我在本手册的步骤8.2中那样将闪亮的服务器连接到GitHub。我现在尝试了几次,但是我得到了这个错误信息:


错误:src refspec master与任何不匹配。



错误:无法将某些参考文献推送到'origin'


是我的代码:

  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的存储库设置中部署了适配密钥。



希望你能帮助我!在此先感谢:)

解决方案



< blockquote>

  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:

error: src refspec master does not match any.

error: failed to push some refs to 'origin'

This is my code:

sudo apt-get -y install git
cd /srv/shiny-server
git init
echo "# shiny-server" >> README.md
git 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.git

The 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:

git init
echo "# shiny-server" >> README.md
git commit -m "first commit"

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 init
echo "# shiny-server" >> README.md
git add --all
git commit -m "first commit"

这篇关于将GitHub连接到Shiny服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆