search

Home  >  Q&A  >  body text

git clone 密码问题

clone github 上面的仓库不需要密码,直接托下来了。

现在公司自建了git服务器,我把之前的 的ssh公钥传上去,git clone时发现需要密码——很久了,不知道密码,尝试了各种,未果.算了, 在新的系统上重建ssh,这回给了个空密码,传了公钥,git clone 时,还是发现要密码,当输入空密码时,依旧不能下下来——

查看别人的做法,我用来不大起作用,来问问各位有什么好的解决之道,先谢谢各位

世界只因有你世界只因有你2774 days ago702

reply all(7)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-04-26 09:04:17

    If the warehouse address is git@your.git.host,那么你需要在 git 用户的 $HOME/.ssh/authorized_keys add your public key in it, so you don’t need a password.

    reply
    0
  • 怪我咯

    怪我咯2017-04-26 09:04:17

    Clear your ~/.ssh/known_hosts

    reply
    0
  • PHP中文网

    PHP中文网2017-04-26 09:04:17

    ssh-keygen .... then ssh-copy-id -i user@server

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-04-26 09:04:17

    mugbya, I encountered the same problem, how did you solve it? . . I don’t think it’s a matter of public and private keys

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-26 09:04:17

    It should be a permissions issue. Look at the permissions of authorized_keys and pay attention to the directory

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-26 09:04:17

    The fastest way is to change the password for the git user with root privileges.
    I guess the reason may be that the permissions of the .ssh directory are too high. You must restrict access to only yourself.

    Posting the reported errors may make it easier to find the problem.
    You can check the auth log on the server to see if there is any information you may need

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-04-26 09:04:17

    Encountered the same problem

    reply
    0
  • Cancelreply