# git要求输入密码怎么办

**URL:** <https://forum.beginner.center/t/topic/2316>\
**Category:** 🛠工具与编程\
**Tags:** git\
**Created:** [2025 年10 月 28 日 07:25 UTC](https://forum.beginner.center/t/topic/2316 "2025-10-28T07:25:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

作者： ![doggie](https://forum.beginner.center/user_avatar/forum.beginner.center/doggie/32/550_2.png) [@doggie](https://forum.beginner.center/u/doggie)\
发布日期： [2025 年10 月 28 日 07:25 UTC](https://forum.beginner.center/t/topic/2316/1 "2025-10-28T07:25:21Z")

</div>

最近在git clone pull等操作时，要求输入git密码

```auto
❯ git clone git@xxx:xxx/xxx.git
Cloning into 'xxxx'...
git@xxx.xxx.xxx.xxx's password: 

```

但是我已经上传了ssh pub，如果使用github等都很正常

折腾半天以后也不知道这个密码是什么，最后放弃，改用别人推荐的http方式，设置好git的链接也一样能用git clone、push、pull

```bash
git remote add origin git@xxxx
git remote set-url origin http://xxx.com/xxx.git

```
