englianhu / library-archieved

🚩🇨🇳🏹🦔中科红旗 RedFlag Linux (🍥Debian)。书中自有黄金屋,书中自有颜如玉。
https://gitee.com/englianhu
1 stars 1 forks source link

`sudo git lfs push origin 世博量化研究院 Remote "origin" does not support the Git LFS locking API. Consider disabling it with: $ git config lfs.https://github.com/englianhu/library.git/info/lfs.locksverify false git@github.com: Permission denied (publickey).: exit status 255` #2

Open englianhu opened 2 years ago

englianhu commented 2 years ago
englianhu@Scibrokes:~/文档/GitHub/library$ git init
已重新初始化已存在的 Git 仓库于 /home/englianhu/文档/GitHub/library/.git/
englianhu@Scibrokes:~/文档/GitHub/library$ git lfs push
Specify a remote and a remote branch name (`git lfs push origin main`)
englianhu@Scibrokes:~/文档/GitHub/library$ git gc --prune=now
枚举对象中: 801, 完成.
对象计数中: 100% (801/801), 完成.
使用 4 个线程进行压缩
压缩对象中: 100% (602/602), 完成.
写入对象中: 100% (801/801), 完成.
总共 801(差异 202),复用 751(差异 187),包复用 0
englianhu@Scibrokes:~/文档/GitHub/library$ sudo git push origin 世博量化研究院
git@github.com: Permission denied (publickey).
fatal: 无法读取远程仓库。

请确认您有正确的访问权限并且仓库存在。
englianhu@Scibrokes:~/文档/GitHub/library$ sudo git lfs push origin 世博量化研究院
Remote "origin" does not support the Git LFS locking API. Consider disabling it with:
  $ git config lfs.https://github.com/englianhu/library.git/info/lfs.locksverify false
git@github.com: Permission denied (publickey).: exit status 255
englianhu commented 2 years ago

猫舍台式应用GitHub Desktop则出现以下错误信息:

Authentication failed. Some common reasons include:

- You are not logged in to your account: see File > Options.
- You may need to log out and log back in to refresh your token.
- You do not have permission to access this repository.
- The repository is archived on GitHub. Check the repository settings to confirm you are still permitted to push commits.
- If you use SSH authentication, check that your key is added to the ssh-agent and associated with your account.
- If you use SSH authentication, ensure the host key verification passes for your repository hosting service.
- If you used username / password authentication, you might need to use a Personal Access Token instead of your account password. Check the documentation of your repository hosting service.

pack limit

englianhu commented 2 years ago
## .........
## .........
englianhu@Scibrokes:~/文档/GitHub/library$ sudo git lfs push origin 世博量化研究院
Remote "origin" does not support the Git LFS locking API. Consider disabling it with:
  $ git config lfs.https://github.com/englianhu/library.git/info/lfs.locksverify false
git@github.com: Permission denied (publickey).: exit status 255
englianhu@Scibrokes:~/文档/GitHub/library$ cd
englianhu@Scibrokes:~$ ssh-agent -s
SSH_AUTH_SOCK=/tmp/ssh-y3pxpqQFAMit/agent.25490; export SSH_AUTH_SOCK;
SSH_AGENT_PID=25491; export SSH_AGENT_PID;
echo Agent pid 25491;
englianhu@Scibrokes:~$ ssh-add ~/.ssh/id_rsa
Identity added: /home/englianhu/.ssh/id_rsa (englianhu@Scibrokes)
englianhu@Scibrokes:~$ eval `ssh-agent -s`
Agent pid 25567
englianhu@Scibrokes:~$ ssh-add ~/.ssh/id_rsa
Identity added: /home/englianhu/.ssh/id_rsa (englianhu@Scibrokes)
englianhu@Scibrokes:~$ ssh -T git@github.com

Hi englianhu! You've successfully authenticated, but GitHub does not provide shell access.

引用:解决git@github.com: Permission denied (publickey)

englianhu commented 2 years ago
englianhu@Scibrokes:~$ cd /home/englianhu/文档/GitHub/library/
englianhu@Scibrokes:~/文档/GitHub/library$ git init
已重新初始化已存在的 Git 仓库于 /home/englianhu/文档/GitHub/library/.git/
englianhu@Scibrokes:~/文档/GitHub/library$ git status
位于分支 世博量化研究院
您的分支领先 'origin/世博量化研究院' 共 6 个提交。
  (使用 "git push" 来发布您的本地提交)

无文件要提交,干净的工作区
englianhu@Scibrokes:~/文档/GitHub/library$ git push
ssh: Could not resolve hostname github.com: Temporary failure in name resolution
fatal: 无法读取远程仓库。

请确认您有正确的访问权限并且仓库存在。
englianhu@Scibrokes:~/文档/GitHub/library$ git config --global core.compression 0
englianhu@Scibrokes:~/文档/GitHub/library$ git push --no-thin
枚举对象中: 332, 完成.
对象计数中: 100% (332/332), 完成.
使用 4 个线程进行压缩
压缩对象中: 100% (312/312), 完成.
写入对象中:  13% (44/332), 258.68 MiB | 2.54 MiB/s
写入对象中:  17% (58/332), 416.46 MiB | 2.53 MiB/s
写入对象中:  34% (116/332), 1.25 GiB | 2.56 MiB/s   
remote: fatal: pack exceeds maximum allowed size (2.00 GiB)
error: 远程解包失败:index-pack abnormal exitiB/s
To github.com:englianhu/library.git
 ! [remote rejected] 世博量化研究院 -> 世博量化研究院 (failed)
error: 无法推送一些引用到 'github.com:englianhu/library.git'

englianhu@Scibrokes:~/文档/GitHub/library$ sudo chmod -R 777 /home/englianhu/文档/GitHub/library/
englianhu@Scibrokes:~/文档/GitHub/library$ sudo git push --force
git@github.com: Permission denied (publickey).
fatal: 无法读取远程仓库。

请确认您有正确的访问权限并且仓库存在。
englianhu commented 2 years ago
englianhu commented 2 years ago

git reset确实知道五种"模式":软,混合,硬,合并和保持.我将从前三个开始,因为这些是您通常会遇到的模式.在那之后你会找到一个不错的奖金,敬请期待.

柔软的

使用时,git reset --soft HEAD~1您将从当前分支中删除最后一次提交,但文件更改将保留在您的工作树中.此外,更改将保留在您的索引上,因此使用a git commit将创建一个提交,其更改与您之前"删除"的提交完全相同.

这是默认模式,与soft非常相似.当您"删除"提交时,git reset HEAD~1仍会保留工作树中的更改,但不会保留索引; 因此,如果要"重做"提交,则必须在提交git add之前添加更改().

使用时,除了上次提交中引入的更改之外,git reset --hard HEAD~1您将丢失所有未经修改的更改.更改将不会保留在您的工作树中,因此执行git status命令将告诉您存储库中没有任何更改.

仔细踩这个.如果您不小心删除了从未跟踪过的未提及的更改git(发言:已提交或至少已添加到索引中),则无法使用它们git.

奖金

保持

git reset --keep HEAD~1是一个有趣和有用的.它仅重置当前 HEAD和给定提交之间不同的文件.如果这些文件中的任何一个具有未更改的更改,则会中止重置.它基本上是一个更安全的版本hard.

当您进行大量更改并希望切换到不同的分支而不会丢失这些更改时,此模式特别有用 - 例如,当您开始处理错误的分支时.

您可以在git reset文档中阅读更多相关信息.

注意

git reset删除提交时,提交并没有真正丢失,只有没有引用指向它或它的任何子进程.你仍然可以git reset通过找到它的SHA-1密钥来恢复被"删除"的提交,例如使用诸如的命令git reflog.

出处: git reset --hard HEAD~1git reset --soft HEAD~1有什么区别?

参考文献:

englianhu commented 2 years ago

Description

I would like to see the possibility to select multiple files in the changes view

Version

GitHub Desktop version: 0.5.8 OS version: Windows 7

Steps to Reproduce

github for windows github for windows

Here you can see I would like to do :

  1. Select first file
  2. press shift
  3. Select second file everything in between gets selected
  4. Right click on selection and click discard

Something similar to this : github for windows2 github for windows2

Expected behaviour: When I click the second file, every file in between would be selected

Actual behaviour: The first file gets deselected (basically you can select only one file at a time) Reproduces how often: 100%


    +1 for multiple selection in the Changes tab

Also, GitHub Desktop for Mac app had a menu item, Repository > Discard Changes to Selected Files, that effectively enabled the discard operation on multiple files:

screen_shot_2017-05-25_at_11_17_55_am

This menu item is missing in the current beta:

screen_shot_2017-05-25_at_11_20_00_am

如何通过台式猫城(GitHub Desktop)一次性多选文件

一般上通过台式猫城(GitHub Desktop)多选文件需要手动逐个打勾非常费事,倘若有好几万个文件就麻烦许多;欲一次性打勾选择多文件的话... 对于数量超额或者体积过大的解决方案,可以通过台式猫城(GitHub Desktop):

猫城(一次性多选 discard) 猫城(一次性多选 include) 猫城(一次性多选 include)2 猫城(一次性多选 include)3

  1. 打勾首个文件
  2. 长按shift字键
  3. 打勾想要选择到达的最终文件
  4. 右键选择Include字键(间中所有文件将会被打勾列入名单)
englianhu commented 1 year ago

当使用猫城下载项目或推送出错时,如果需要公钥,可通过以下代码生成新公钥,再到猫城网站https://github.com/settings/keys 设置修改SSH公钥。

## 生产公钥
ssh-keygen -t rsa

## 查询公钥
cat ~/.ssh/id_rsa.pub
englianhu commented 1 year ago
englianhu commented 9 months ago

LFS