git克隆通过https 401错误,并不要求用户名或密码 [英] git clone over https 401 error and not asking for username or password
问题描述
我在Codaset上有一个私人git仓库。通常,当我尝试通过Windows计算机上的HTTPS克隆它时,它会向我询问我的用户名和密码。当我尝试在Ubuntu服务器上克隆它时,它永远不会要求我提供用户名或密码,并且会因401错误而失败。我需要做什么改变?
这是我正在做的事:
git clone https://codaset.com/username/project_name.git destination_folder_name.git
我使用这种格式:
https://用户名:password@codaset.com/username/project_name.git destination_folder
<然而,根据这两篇文章,使用该方法可能是一个安全问题:
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?
Here is what I am doing:
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 destination_folder
However according to these 2 posts, using that method could be a security problem:
Can a username and password be sent safely over HTTPS via URL parameters?
Username and password in https url
这篇关于git克隆通过https 401错误,并不要求用户名或密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!