开发者社区> 问答> 正文

git@osc提交不上去代码?报错

ssh配的,ssh也能连上,

push代码就报错

git push -u origin master
git@oschina.net's password:
Permission denied, please try again.
git@oschina.net's password:
Permission denied, please try again.
git@oschina.net's password:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
fatal: Could not read from remote repository.


Please make sure you have the correct access rights
and the repository exists.

展开
收起
爱吃鱼的程序员 2020-06-12 10:44:09 564 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    公钥没配成功,重新配置一遍

    请检查是否配到部署公钥去了,部署公钥的话是只读权限,无法写

    应该加到http:git.oscihna.net/keys

    回复<aclass='referer'target='_blank'>@Zoker:这个地址就是公chi啊我已经把网址都给你贴出来了这个要改哪里好像是的

    ssh-vTgit@git.oschina.net发出来看下

    --------

    [UPDATE]

    不用发了,你的地址弄错了,是git@git.oschina.net不是git@oschina.net

    这个要怎么解决,公司的电脑上不成功,在家能用Theauthenticityofhost'oschina.net(112.124.5.74)'can'tbeestablished.RSAkeyfingerprintis谢谢啊

     远程地址是git@git.oschina.net:你的短地址/项目名.git

    删除gitremotermorigin

    添加gitremoteaddorigin <spanstyle="font-size:13.3333px;">git@git.oschina.net:你的短地址/项目名.git

    解决了,谢谢,我没用这个,我把本地的.git文件夹删除了重新init就OK了,但还是谢谢你<imgsrc="/js/ke/plugins/emoticons/0.gif"alt="0"/>

    2020-06-12 10:44:26
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
新一代高效Git协同模型 立即下载
AGit-Flow:新一代高效Git协同模型 立即下载
AGit-flow:新一代高效Git协同模型 立即下载

相关实验场景

更多