是否可以在没有 rsa 凭据或更糟的是它自己的 github 帐户的情况下将私有推送或拉到github
远程服务器。
我在服务器上尝试ssh-keygen
了一个新密钥并将其添加到我的个人 github 配置文件中。这似乎不起作用。这里有任何指针。
下一步:为我的机器创建一个 github 帐户,将其添加到私有项目中,然后使用该机器帐户进行 git。
如果那是最好的选择;然后 github 将填满机器帐户。
What you are asking sounds like ssh forwarding. Ssh forwarding is for execute commands that require your local keys in a remote server (For an extended explanation about ssh forwarding, go here: http://www.unixwiz.net/techtips/ssh-agent-forwarding.html#fwd). Github has a guide for it: https://help.github.com/articles/using-ssh-agent-forwarding.
To sum up the content of the guide, you should have be able to connect from your local machine to Github. You can test it with:
ssh -T git@github.com
# Hi username! You've successfully authenticated, but GitHub does not provide
# shell access.
Once you have access to github, you have to have a file in your local machine in ~/.ssh/config
with:
Host example.com
ForwardAgent yes
replacing example.com
with the hostname of your server.
Then you can connect to the server and run again ssh -T git@github.com
, just to know if ssh forwarding is working.