通过jenkins错误对github进行身份验证

时间:2020-07-08 15:35:40

标签: git jenkins

我已将Jenkins安装到Windows 10计算机上,并在“源代码管理”部分中尝试使用用户名和密码凭据对github进行身份验证时收到以下错误:

Failed to connect to repository : ....
returned status code 128:
stdout: 
stderr: Logon failed, use ctrl+c to cancel basic credential prompt. 
remote: Invalid username or password.
fatal: Authentication failed ....

我能够通过终端将存储库克隆到C :,没有问题,而且我还设法在macOS上使用相同的凭据执行了相同的设置,没有任何问题。但是,我正在使用的Windows计算机可以通过VPN远程访问

我尝试使用SSH密钥对进行配置,但收到以下错误:

Unhandled Exception: System.TypeInitializationException: The type initializer for 'Microsoft.Alm.Cli.Program' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The paging file is too small for this operation to complete. (Exception from HRESULT: 0x800705AF) 
  at AzureDevOps.Authentication.TokenScope.op_BitwiseOr(TokenScope left, TokenScope right) 
  at Microsoft.Alm.Cli.Program..cctor() 
  --- End of inner exception stack trace --- 
  at Microsoft.Alm.Cli.Program.Main(String[] args)
remote: Invalid username or password.
fatal: Authentication failed .....

在此提供任何帮助

谢谢

1 个答案:

答案 0 :(得分:0)

由于我尝试访问的存储库具有两个因素的身份验证,因此此处的解决方案是使用通过HTTPS访问时在github中生成的个人访问令牌而不是密码。