与使用 SSH 相比,使用 HTTPS 远程 URL 具有一些优势。 它比 SSH 更容易设置,通常通过严格的防火墙和代理进行工作。 However, it also prompts you to enter your GitHub Enterprise Server credentials every time you pull or push a repository.
When Git prompts you for your password, enter your personal access token (PAT) instead. Password-based authentication for Git is deprecated, and using a PAT is more secure. For more information, see "Creating a personal access token."
通过配置 Git 为您缓存凭据,您可以避免提示输入密码。 Once you've configured credential caching, Git automatically uses your cached personal access token when you pull or push a repository using HTTPS.