相关疑难解决方法(0)

如何将现有的非空目录转换为Git工作目录并将文件推送到远程存储库

  1. 我有一个非空目录(例如/ etc/something),其中包含无法重命名,移动或删除的文件.

  2. 我想将这个目录检查到git中.

  3. 我希望能够使用"git push"或类似的东西将此存储库的状态推送到远程存储库(在另一台计算机上).

这很简单,使用Subversion(目前我们使用Subversion),使用:

svn mkdir <url> -m <msg>
cd <localdir>
svn co <url> .
svn add <files etc>
svn commit -m <msg>
Run Code Online (Sandbox Code Playgroud)

什么是git等价物?

我可以"git clone"到一个空目录中,只需移动.git目录并使一切正常吗?

git

616
推荐指数
6
解决办法
30万
查看次数

作为断电的一部分,密码身份验证被暂时禁用。请改用个人访问令牌

我使用用户名密码来推送我的代码,它已经工作了几个月,但突然间我无法做到并收到此错误:

Username for 'https://github.com': shreyas-jadhav
Password for 'https://shreyas-jadhav@github.com': 
remote: Password authentication is temporarily disabled as part of a brownout. Please use a personal access token instead.
remote: Please see https://github.blog/2020-07-30-token-authentication-requirements-for-api-and-git-operations/ for more information.
Run Code Online (Sandbox Code Playgroud)

请注意,该链接没有帮助。即使使用生成的令牌也无济于事。

主持人注意:这是GitHub 计划中且即将进行的永久性服务更改的一部分

git github token git-pull github-api

237
推荐指数
11
解决办法
10万
查看次数

使用令牌使用GitHub进行身份验证

我正在尝试使用个人访问令牌与GitHub进行身份验证.在github的帮助文件中,它声明使用curl方法进行身份验证(https://help.github.com/articles/creating-an-access-token-for-command-line-use).我试过这个,但我仍然无法推送给GitHub.请注意,我正试图从未经身份验证的服务器(Travis-CI)推出.

cd $HOME
git config --global user.email "emailaddress@yahoo.com"
git config --global user.name "username"

curl -u "username:<MYTOKEN>" https://github.com/username/ol3-1.git
git clone --branch=gh-pages https://github.com/username/ol3-1.git gh-pages

cd gh-pages
mkdir buildtest
cd buildtest
touch asdf.asdf

git add -f .
git commit -m "Travis build $TRAVIS_BUILD_NUMBER pushed to gh-pages"
git push -fq origin gh-pages
Run Code Online (Sandbox Code Playgroud)

此代码导致错误:

remote:匿名访问scuzzlebuzzle/ol3-1.git被拒绝.

致命:" https://github.com/scuzzlebuzzle/ol3-1.git/ "的身份验证失败

谢谢

github github-pages

93
推荐指数
20
解决办法
16万
查看次数

使用token推送一些代码到github

谁能帮我解决这个问题? “2021 年 8 月 13 日取消了对密码身份验证的支持。请改用个人访问令牌。远程:请参阅https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations /有关更多信息。致命:无法访问“https://github.com/codingTheWorld777/react-mini-projects.git/”:请求的 URL 返回错误:403” 我无法使用我的令牌访问 github 所以我可以推送一些代码到github。 在此处输入图片说明

github token

41
推荐指数
6
解决办法
2万
查看次数

如何在WSL上使用Git凭证存储(Windows上的Ubuntu)?

我试过按照这些说明操作:https://stackoverflow.com/a/40312117/21728基本上这样做:

sudo apt-get install libsecret-1-0 libsecret-1-dev
cd /usr/share/doc/git/contrib/credential/libsecret
sudo make
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
Run Code Online (Sandbox Code Playgroud)

但是当我进行任何网络操作时,我收到此错误:

** (process:7902): CRITICAL **: could not connect to Secret Service: Cannot autolaunch D-Bus without X11 $DISPLAY
Run Code Online (Sandbox Code Playgroud)

这是合乎逻辑的,因为确实没有X11显示器.

如何在Windows(WSL)上的Ubuntu上使Git凭据缓存工作?

git ubuntu windows-subsystem-for-linux

39
推荐指数
5
解决办法
8951
查看次数

已于 2021 年 8 月 13 日删除对密码身份验证的支持

很长一段时间我都在使用 tortoise git,今天我无法使用 tortoise git 并收到以下错误。

git.exe pull --progress -v --no-rebase "origin" 远程:对密码身份验证的支持已于 2021 年 8 月 13 日删除。请改用个人访问令牌。远程:请参阅 https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ 了解更多信息。

我正在使用最新的 tortoise git 版本。 在此输入图像描述

我了解 git 的最新变化。但我想用乌龟git。有人请帮我解决这个问题。

git github tortoisegit git-authentication personal-access-token

36
推荐指数
4
解决办法
8万
查看次数

在Windows 10中发送git命令时出现"致命:身份验证失败" - 错误

更新域密码后,无法再访问git-repo.VS Code和Source Tree以及Visual Studio在pull,push,fetch等上返回以下错误消息.

fatal: Authentication failed
Run Code Online (Sandbox Code Playgroud)

通常会出现凭据弹出窗口,但这不会发生.也是共同的建议......

git config --global credential.helper wincred
Run Code Online (Sandbox Code Playgroud)

...不管用.

windows git atlassian-sourcetree visual-studio-code access

33
推荐指数
4
解决办法
3万
查看次数

从 Visual Studio Code (1.62.2) 推送到 GitHub 时出现“致命:身份验证失败”

目前,我们中的许多人都遇到了无法再将更改推送到 GitHub 并收到 fatal: Authentication failed for错误的问题。这已在 Linux 上观察到。

这是因为最新版本的 Visual Studio Code (1.62.2) 引入了此错误。

此版本是否有修复程序或其他解决方法?

git github visual-studio-code

30
推荐指数
5
解决办法
7万
查看次数

Android Studio 登录Github失败

我想在 Github 上分享我的 Android Studio 项目,但是当我点击分享时,它似乎

http://127.0.0.1:63342/api/github/oauth/authorization_code?code=14c943d3435fe66a54f7

它要求输入用户名和密码。我尝试使用我的 Github 用户名和密码登录但失败。

*刚刚开始编程2周

android github android-studio

15
推荐指数
2
解决办法
1万
查看次数

将SSH密钥添加到GitHub的问题

我有一个似乎与GitHub使用的SSH密钥格式有关的问题.我使用Git Bash生成一个新的SSH密钥

$ ssh-keygen -t rsa -C "youremail@youremail.com"
Run Code Online (Sandbox Code Playgroud)

然后,我将密钥复制到我的GitHub帐户页面设置中的SSH部分.但是,它附带的问题通知如下

Key is invalid. It must begin with 'ssh-ed25519', 'ssh-rsa', 'ssh-dss', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or 'ecdsa-sha2-nistp521'. Check that you're copying the public half of the key
Run Code Online (Sandbox Code Playgroud)

之后,我编辑了我的SSH密钥,最后是ssh-rsa和我的电子邮件地址.但问题仍然存在.

谁能告诉解决方案呢?

谢谢!

git ssh github ssh-keys

14
推荐指数
3
解决办法
2万
查看次数