Tag Archives: git

[Solved] Angular&CI/CD:Error: initial exceeded maximum budget

During CI/CD process of angular project, the following errors occur:

Warning: initial exceeded maximum budget. Budget 2.00 MB was not met by 3.01 MB with a total of 5.01 MB.
Error: initial exceeded maximum budget. Budget 5.00 MB was not met by 6.83 kB with a total of 5.01 MB.

The packed file is too large for the specified file size

Solution: modify the angular in the project JSON configuration file (memory parameters)

 "budgets": [{
                  "type": "initial",
                  "maximumWarning": "2mb",
                  "maximumError": "6mb"
                },
              ]

I originally set the maximum error to 5MB, but now I can set it to 6MB. The specific problem depends on the situation

[Solved] Gitee generates public key error: Enter file in which to save the key…

Directly report an error using a local command prompt:
Enter file in which to save the key (C:\Users\files?.ssh/id_ed25519): Could not create directory 'C:\\Users\\\346\236\227\346\265\251\345\256\217/.ssh': Invalid argument Enter passphrase (empty for no passphrase): Enter same passphrase again: Saving key "C:\\Users\\\346\236\227\346\265\251\345\256\217/.ssh/id_ed25519" failed: No such file or directory

 


Solution: Press shiftjian + right click under the corresponding file, select git to open it, and use git to generate

Error BC: command not found when git bash runs shell script

catalog:

1. Problem Description: 2. Error reporting reason: 3. Solution:

1. Problem Description:

Under Windows system, an error occurs when running shell script with git bash:

bc: command not found

2. Error reporting reason:

Git is missing the BC module, and git cannot directly install the BC module

3. Solution:

By downloading msys2, download the BC package in msys2 and copy it to git
specific steps:
(1) install msys2 and download the address https://www.msys2.org/
(2) After installation, open the msys2 shell and install BC with the following command

pacman -S bc

(3) Go to the msys64 \ usr \ bin folder under the msys2 installation directory and find bc.exe
(4) copy the bc.exe file to the GIT \ usr \ bin folder under the GIT installation directory
re run the shell script in Git bash, and there will be no BC: command not found error.

[Solved] Mac Install homebrew Error: error: Not a valid ref: refs/remotes/origin/master

The MAC reports the following error after installing homeberw:

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /usr/sbin/chown -R aa:admin /opt/homebrew
==> Downloading and installing Homebrew...
HEAD is now at 8de10a05b Merge pull request #10472 from MikeMcQuaid/new-issue-templates
error: Not a valid ref: refs/remotes/origin/master
fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Error: Fetching /opt/homebrew/Library/Taps/homebrew/homebrew-core failed!
fatal: invalid upstream 'origin/master'
Failed during: /opt/homebrew/bin/brew update --force --quiet

The solution is as follows:

Uninstall homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"

Set git compression:

git config --global core.compression 0

Set git buffer size:

git config --global http.postBuffer 1048576000

Reinstall brew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Unknown SSL protocol error in connection to xxx:443 [How to Solve]

1. Unknown SSL protocol error in connection to XXX: 443

Unknown SSL protocol error in connection to XXX: 443 occurs when Git is used to download from a remote location..

Method 1:

(example):

Set up proxy server:

: Add in .gitconfig

http.proxy=127.0.0.1:8087

http.sslVerify=false

Method 2:

(example):

Type directly on the command line

git config --global http.proxy 127.0.0.1:8087

git config --global http.sslVerify false

[Solved] Junit.test use error: log4j:WARN No appenders could be found for logger

1. Warning message
Error output message.
log4j:WARN No appenders could be found for logger (org.apache.ibatis.logging.LogFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

Solution:
2.1 No log4j dependency is introduced
Insert the following code in the pom.xml file.

<dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>

Configure the log4j.properties file and put this folder under Src/main/resources

log4j.rootLogger=debug, stdout, R

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=example.log

log4j.appender.R.MaxFileSize=100KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=5

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n


perhaps

# Set root category priority to INFO and its only appender to CONSOLE.
#log4j.rootCategory=INFO, CONSOLE            debug   info   warn error fatal
log4j.rootCategory=debug, CONSOLE, LOGFILE

# Set the enterprise logger category to FATAL and its only appender to CONSOLE.
log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE

# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} %-6r [%15.15t] %-5p %30.30c %x - %m\n

# LOGFILE is set to be a File appender using a PatternLayout.
log4j.appender.LOGFILE=org.apache.log4j.FileAppender
log4j.appender.LOGFILE.File=d:\axis.log
log4j.appender.LOGFILE.Append=true
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%d{ISO8601} %-6r [%15.15t] %-5p %30.30c %x - %m\n


Git Error: remote: HTTP Basic: Access denied [How to Solve]

reason:

The user name and password configured by local git are inconsistent with those registered on gitlab.

Solution:

If the account and password are changed, execute the following commands on the GIT command line

git config --system --unset credential.helper

Then re execute your operations (such as pull and push), and you will be prompted to enter your account and password again.

What’s your feeling?

In retrospect, it seems that I did create a new user name and password, or I changed my password. ok

[Solved] git error – remote: http basic: access denied

After using the git push command, an error is reported as follows:

another error is:

git Failed to connect to port xxxx: Connection refused

based on these two situations, the account and password logged in at the time of the first use are largely inconsistent with the current warehouse account password, so the user will be prompted to connect without permission or refuse access. At this time, the best way is to reset the GIT account password!

Solution:

first enter the local warehouse directory, then right-click “git bash here”, and enter the following instructions in the pop-up terminal input box:

git config --system --unset credential.helper

Then use the git push command again to guide you to enter the account and password again. After you enter it correctly, you can connect to the remote warehouse successfully!!