git clone over https 401 错误并且不要求输入用户名或密码 [英] git clone over https 401 error and not asking for username or password

查看:26
本文介绍了git clone over https 401 错误并且不要求输入用户名或密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Codaset 上有一个私有的 git 存储库.通常,当我尝试在我的 Windows 机器上通过 HTTPS 克隆它时,它会询问我的用户名和密码.当我尝试在 Ubuntu 服务器上克隆它时,它从不要求我输入用户名或密码,并且失败并显示 401 错误.我需要做什么不同的事情?

I have a private git repository on Codaset. Normally when I try to clone it over HTTPS on my Windows machine, it asks me for my username and password. When I try to clone it on an Ubuntu server, it never asks me for a username or password and it fails with a 401 error. What do I need to do differently?

这是我在做什么:

git clone https://codaset.com/username/project_name.git destination_folder_name.git

推荐答案

我使用这种格式让它工作:

I got it to work using this format:

https://username:password@codaset.com/username/project_name.git 目的地文件夹

但是根据这 2 个帖子,使用该方法可能存在安全问题:

However according to these 2 posts, using that method could be a security problem:

用户名可以吗和密码是否通过 URL 参数通过 HTTPS 安全发送?

https url 中的用户名和密码

这篇关于git clone over https 401 错误并且不要求输入用户名或密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆