git将批处理作业推送到github,并使用qsub将其添加到服务器中

问题描述 投票:0回答:1

我设置了一个ssh-agent并给了它一个id_rsa密钥,所以我在Linux服务器的终端上使用git命令更新到github时没有问题,但是当我尝试通过使用qsub的bash脚本执行此操作时将作业提交到服务器,我收到以下错误消息,

在分支主机上

没有提交,工作目录干净

权限被拒绝(公钥)。

致命:无法从远程存储库中读取。

请确保您具有正确的访问权限并且存储库存在。

我的shell脚本是,

#!/bin/bash git add *.png git commit -m "upload_fig" git push

我也像下面一样设置〜/ .ssh / config,

Host remoteHost ForwardAgent yes

Host github HostName github.com User git IdentityFile ~/.ssh/id_rsa

任何人都知道如何解决此问题?谢谢!

github batch-processing
1个回答
0
投票

您要查找的内容可能在this中。我猜您没有将您的公钥〜/ .ssh / id_rsa添加到您的github帐户中。

© www.soinside.com 2019 - 2024. All rights reserved.