git clone over https 401 错误并且不要求输入用户名或密码 [英] git clone over https 401 error and not asking for username or password
问题描述
我在 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 安全发送?
这篇关于git clone over https 401 错误并且不要求输入用户名或密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!