Under Linux, Git cannot be used if the server has already added a public key
Git Clone and other functions cannot be used under Linux. Prompt:
sign_and_send_pubkey: signing failed: agent refused operation
In turn (if no public key is added) :
ssh-add
eval $(ssh-agent -s)
Execute (public key has been added) :
eval $(ssh-agent -s)
Eval $(sSH-Agent-s) system runs at startup
Obviously, the above method requires executing eval $(sSH-agent-s) before using Git for the first time. Otherwise, it is not friendly to use an error. We want to avoid the trouble of eval $(ssh-agent-s) once and for all, which is unlikely to be remembered. Therefore, I need to initialize this command when the system boot, help me to execute this command.
Current user (if you prefer “any configuration is for users”)
modify ~/.bashrc, vim ~/.bashrc
add this line (suggested at the end) :
# 启动 ssh-agent,“> .null”是为了解决在终端喊一嗓子的问题(其实就是将它输出到一个.null文件中去了)
eval $(ssh-agent) > .null
All users (recommended)
modify (may need sudo, add it yourself as necessary) /etc/bashrc, vim /etc/bashrc
add this line (it is recommended to add it at the end) :
# 启动 ssh-agent,“> .null”是为了解决在终端喊一嗓子的问题(其实就是将它输出到一个.null文件中去了)
eval $(ssh-agent) > .null
div>
Read More:
- Elasticsearch cluster cannot be started. The following prompt fails to send join request to master appears
- Git error prompt: fatal: not a git repository (or any of the parent directories):. Git
- Using greater than sign or less than sign to report error in mybatis
- How to Solve apt get update problem: usr/lib/apt/methods/HTTPS could not be found_PUBKEY 7EA0A9C3F273FCD8
- linux docker Error Failed to get D-Bus connection: Operation not permitted
- Prompt 550 remove directory operation failed when FTP delete folder
- ZABBIX agent failed to start
- The difference between single equal sign and double equal sign EQ in shell script
- Solve the problem of prompt “failed to sync branch” when using Git
- Linux-mysql8.0 password reset problem – error 1396 (HY000): Operation alter user failed for ‘root’ @’localhost ‘
- Failed to create agent because there is no valid NavMesh
- SQL Server calls Database Mail to send mail error: Msg 229, Level 14, State 5, Procedure sp_send_dbmail, Line 1 EXECUTE
- Linux boot prompt “failed to initialize Hal!” solution
- Git push failed, prompt unpack error / unpack failed solution
- git clone prompt error: RPC failed result=22, HTTP code = 404 problem
- Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign
- Springboot project start swagger prompt error err_ CONNECTION_ Refused solution
- Macfee can not be upgraded, the prompt returns an error
- Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Cannot
- linux tomcat Run (DWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugIni)