Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring云配置服务器-使用2FA连接到Github帐户_Spring_Github_Spring Cloud - Fatal编程技术网

Spring云配置服务器-使用2FA连接到Github帐户

Spring云配置服务器-使用2FA连接到Github帐户,spring,github,spring-cloud,Spring,Github,Spring Cloud,我正在尝试创建一个SpringCloudConfig服务器,以从私有GitHub存储库检索配置文件。我的GitHub帐户激活了双因素身份验证,因此我不希望下面的配置能够正常工作,虽然它不能正常工作,但我找不到任何文档来建议我需要做什么才能使其正常工作 我需要设置什么样的配置才能使连接正常工作 spring.cloud.config.server.git.uri=https://github.com/DanBonehill/photo-app-config spring.cloud.config.

我正在尝试创建一个SpringCloudConfig服务器,以从私有GitHub存储库检索配置文件。我的GitHub帐户激活了双因素身份验证,因此我不希望下面的配置能够正常工作,虽然它不能正常工作,但我找不到任何文档来建议我需要做什么才能使其正常工作

我需要设置什么样的配置才能使连接正常工作

spring.cloud.config.server.git.uri=https://github.com/DanBonehill/photo-app-config
spring.cloud.config.server.git.username=USERNAME
spring.cloud.config.server.git.password=PASSWORD
错误

org.eclipse.jgit.api.errors.TransportException:https://github.com/DanBonehill/photo-app-config: 未授权

您可以尝试并执行(尚未测试)的操作是从Github控制台创建个人访问令牌

然后配置

spring.cloud.config.server.git.username=<yourusername>
spring.cloud.config.server.git.password=<yourtoken>
spring.cloud.config.server.git.username=
spring.cloud.config.server.git.password=
您可以尝试和做的(尚未测试)是从Github控制台创建个人访问令牌

然后配置

spring.cloud.config.server.git.username=<yourusername>
spring.cloud.config.server.git.password=<yourtoken>
spring.cloud.config.server.git.username=
spring.cloud.config.server.git.password=

不要使用
用户名
密码
您应该使用
ssh
密钥,它可以引导您通过

不要使用
username
password
您应该使用
ssh
键,它可以引导您通过

使用Git密码的基本身份验证已被弃用,很快将不再有效。有关建议的解决方法和删除日期的更多信息,请访问。

使用Git密码的基本身份验证已被弃用,不久将不再有效。有关建议的解决方法和删除日期的更多信息,请访问。

谢谢,我已将uri更改为ssh uri,但仍然不起作用。我意识到这是因为我的私钥格式不对。一旦我纠正了这一点,一切都正常了。谢谢,我把uri改成了ssh,但仍然不正常。我意识到这是因为我的私钥格式不对。一旦我纠正了这一点,一切都起作用了。这实际上起作用了!!对于将来想尝试这种方法的人来说,这种方法确实有效!!对于将来谁想尝试这种方法