Muh*_*han 16 git github github-enterprise
我的git工作正常,然后没有改变以下问题开始发生,我已经尝试重置缓存
credentials.helper
我已经找到了几乎每一个stackoverflow的答案
remote: Password authentication is not available for Git operations.
remote: You must use a personal access token or SSH key.
remote: See https://github.ibm.com/settings/tokens or
'https://github.ibm.com/WBurney/Blockchain_SDO.git/':
The requested URL returned error: 403
Run Code Online (Sandbox Code Playgroud)
谢谢
Von*_*onC 23
如果您已将公共ssh密钥注册到GitHib企业帐户,则可以使用ssh网址来解决问题
cd /path/to/repo
git remote set-url origin git@github.ibm.com:WBurney/Blockchain_SDO.git
git push
Run Code Online (Sandbox Code Playgroud)
但是关于您的原始问题,请尝试按照" 为命令行创建个人访问令牌 ".
如果您使用的是Mac,请从OSX Keychain更新您的凭据.
Aja*_*mar 13
尝试以下之一 -
git clone https://<user-name>:<git-token>@<github-path.git>
Run Code Online (Sandbox Code Playgroud)
roh*_*rde 13
您需要重置凭据。打开 GIT CMD 并输入以下命令
git credential reject
Run Code Online (Sandbox Code Playgroud)
按回车键。光标将等待下一个输入。然后输入
protocol=https
host=git.example.com
Run Code Online (Sandbox Code Playgroud)
将 git.example.com 替换为您的链接。
按“enter”两次,让 git 知道命令结束。现在,在任何 git 操作之前,您需要做两件事,因为它首先会验证您的用户名和密码。
接下来,进入 git cmd 并进行 git 操作。例如 -
git clone https://consulting-github.com/Rohan-Chikorde/example.git
启动后,它将提示输入用户名和密码。提供用户名示例:Rohan-Chikorde和密码:e67682yourgeneratedtoken如上所述,您就可以开始了。
接受的答案仅适用于ssh,不适用于https。
缓存重置命令似乎最近已更改。对我来说,最终使它起作用。
git credential reject
protocol=https
host=github.<YOUR_COMP>.com
Run Code Online (Sandbox Code Playgroud)