Total: could not read username for ‘http:// solution
After deploying the clone (cicd software), when the commit is triggered, the problem occurs when the clone runner executes the pull warehouse code (on his deployed gogs)
Initialized empty Git repository in /drone/src/.git/
+ git fetch origin +refs/heads/master:
fatal: could not read Username for 'http://ip:port': terminal prompts disabled
The reason is that you need to enter the user name and password, but because this is cicd software, there is no time to enter the password, so there are two solutions:
Using SSH, you can produce git public key on the server where drone is located and upload it to code hosting (I use the gogs built by myself here, but there will also be GitHub, gitea, gitee, gitlab, etc.), so that you don’t need to download and upload the user name and password, and use the memory password mechanism of GIT to save the user name and password
Enter the server where the drone is located, log in with the drone process user, enter the home directory ( Cd ~
) and execute git clone [your git code path]
, and find that you need to enter a password, Ctrl + C
interrupt execution touch. Git credentials
create. Git credentials file execute vim. Git credentials
edit the file, press I key to enter edit mode, enter: HTTP (s):// {your user name}: {your password} @ your git server address
[Note: select HTTPS/HTTP, Remove curly brackets] press ESC
Enter : WQ
save and exit to execute git config -- global credential.helper store
cat ~ /. Gitconfig
found one more item:
[credential]
helper = store
Explain that it has been configured. Try again git clone [your git code path]
no need to enter a password
Fatal: could not read username for ‘http://…’: terminal prompts disabled problem solving~
Read More:
- Golang Error: fatal error: concurrent map read and map writ
- [Solved] Remote URL test failed: Could not read from remote repository.
- [Solved] Non-fatal Exception: java.lang.UnsatisfiedLinkError: dlopen failed: library “libmmkv.so“ not found
- [Solved] fatal: not in a git directory Error: Command failed with exit 128: git
- [Solved] bin/hive Startup Error: Operation category READ is not supported in state standby
- [Solved] Mac VS Code fatal error: ‘bits/stdc++.h‘ file not found
- Mac Pyaudio Installation fatal error: ‘portaudio.h‘ file not found
- Git pull code error fatal: authentication failed fo
- [Solved] Android12 Error: fatal error: ‘mediadrm/ICrypto.h‘ file not found
- [Solved] Redis Cache Error: org.springframework.data.redis.serializer.SerializationException: Could not read JSON..
- [Solved] MAC Compile Error: fatal error: ‘endian.h‘ file not found
- [Go] Solve the fatal error: concurrent map writes map is not concurrently safe
- XML read process error: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1] Message: Content not allowed in preamble
- [Solved] Mac Cmake Complie openmp Error: fatal error: ‘omp.h‘ file not found
- [Solved] Cannot read properties of undefined (reading ‘ajax‘); Cannot read property ‘ajax‘ of undefined
- Uniapp: TypeError: Cannot read property ‘apply‘ of undefined (H5 does not report an error, but the real machine runs with an error)
- Kubernetes Error: Error in configuration: unable to read client-cert* unable to read client-key*
- How to Solve Error: could not read ok from ADB Server.failed to start daemon error: cannot connect to daemon
- [Solved] fatal error C1083: Could Not Open Unable to open include file:“stdint.h”: No such file or directory