Tag Archives: gitlab

[Solved] TortoiseGitPlink Fatal Error: No supported authentication methods available (server sent: publi

1. Press

Today, you will be prompted when you upgrade tortoisegit and then use SSH to pull or push code from GitHub (you should also be prompted for each new installation):

TortoiseGitPlink Fatal Error:No supported authentication methods available (server sent: publickey)

2. Solution steps

Open the settings of TortoiseGit, click Network, and then change the path of SSH client to git:

by default, TortoiseGitPlink is used for the SSH client of TortoiseGit, which seems to fail to work normally in many cases

[Solved] TensorRT Error: Assertion Error in trtSmToCask: 0 (Unsupported SM.)

Error message:

E20211126 11:55:13.654 140412916315904 tensorrt.cpp:10] …/rtSafe/cuda/caskUtils.cpp (98) – Assertion Error in trtSmToCask: 0 (Unsupported SM.)

Reason: tensorrt version does not match CUDA or cudnn version. For example, the author’s tensorrt version is 7.2.1, while CUDA is the latest 11.5 version. CUDA version is too high to adapt:

Solution: reinstall CUDA or tensorrt
suggestion: reinstall CUDA because different versions of tensorrt have inconsistent codes. For example, tensorrt 7.2.1 and tensorrt 8.2.1 require that noexcept be added when rewriting virtual functions. If the amount of code is small, consider reinstalling tensorrt
attach the matching requirements of tensorrt, CUDA and cudnn versions: tensorrt release note

[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


[Solved] Gitlab Error: gitlab-ctl reconfigure Error: STDERR: initdb: error: invalid locale settings; check LANG and L

The error report is shown in the figure

There was an error running gitlab-ctl reconfigure:

execute[/opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8] (postgresql::enable line 49) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8 ----
STDOUT: The files belonging to this database system will be owned by user "gitlab-psql".
This user must also own the server process.
STDERR: initdb: error: invalid locale settings; check LANG and LC_* environment variables
---- End output of /opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8 ----
Ran /opt/gitlab/embedded/bin/initdb -D /var/opt/gitlab/postgresql/data -E UTF8 returned 1
                   Default character set issues

Ensure that there is more than 4G in the

Solution process:

vim /etc/profile
# Add the following to the end of the configuration file
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# reread the environment variables
[root@localhost src]# source /etc/profile
# Reload
[root@localhost src]# gitlab-ctl reconfigure
It is best to change the password the first time you enter
Details: > https://blog.csdn.net/weixin_46115601/article/details/120721246

[Solved] `handle_argument_error‘: ERROR: “rails console“ was called with arguments [“production“]

 

Problem background

An error occurs when gitlab modifies the root password:

`handle_ argument_ error’: ERROR: “rails console” was called with arguments [“production”] (Thor::InvocationError)

As shown in the figure:

Note that the following prompt: Usage: “rails console [options]” is incorrect

Change password normally

There are only two parameters in total. After trying, the correct instruction is as follows:

gitlab-rails console -e production

be accomplished!

Gitlab nginx wont start to work. [down: nginx: 1s, normally up, want up; run: log: (pid 20128)xxx]

conclusion
I got this problem as well. and now I’ve solved it.
solution
I’ve modified the /etc/gitlab/gitlab.rb file, changed into
nginx[‘redirect_http_to_https_port’] = 80
nginx[‘listen_port’] = 443
and sudo gitlab-ctl reconfigure + sudo gitlab-ctl restart, and it works.
process
in the past, the reason i could connect to gitlab server is because that my colleague have set something in the /var/opt/gitlab/nginx/conf/gitlab-http.conf file.

Redirects all HTTP traffic to the HTTPS host
server {
  listen *:80;

  server_name gitlab.xxxxx.com;
  server_tokens off; ## Don't show the nginx version number, a security best practice


  location/{
    return 301 https://gitlab.xxxxxx.com:443$request_uri;
  }

  # health checks configuration
  include /var/opt/gitlab/nginx/conf/gitlab-health.conf;

  access_log  /var/log/gitlab/nginx/gitlab_access.log gitlab_access;
  error_log   /var/log/gitlab/nginx/gitlab_error.log;
}

server {
  listen *:443 ssl http2;


  server_name gitlab.xxxxxx.com;
  server_tokens off; ## Don't show the nginx version number, a security best practice

and once if I’ve use the command sudo gitlab-ctl reconfigure, and the file gitlab-http.conf would be covered by /etc/gitlab/gitlab.rb. and the nginx settings in /etc/gitlab/gitlab.rb would start to take position that makes me cannot visit gitlab server after using the command sudo gitlab-ctl reconfigure. and now I’ve set the nginx settings right in /etc/gitlab/gitlab.rb just like in the solution part. hope it could help. thx.

Gitlab Reconfigure is Stuck ruby_block[wait for redis service socket] action run

Gitlab is stuck in Ruby_ block[wait for redis service socket] action run

Environment: Ubuntu 20

When installing gitlab , execute sudo gitlab CTL reconfigure , and get stuck in this place when the /etc/gitlab/gitlab.rb file is installed

Insert a picture description here

and wait for a long time, but you don’t see any change in the log information output from the console.

Solution:
open another terminal and start the following command

sudo /opt/gitlab/embedded/bin/runsvdir-start

Or execute the above command in the background in the current terminal window

nohup /opt/gitlab/embedded/bin/runsvdir-start &

Then execute

sudo gitlab-ctl reconfigure

An error occurred while loading commit signatures

After a new computer is replaced, the following error will be reported when you re open the gitlab project management web page in chrome:

An error occurred while loading commit signatures

Or the following error:

Error fetching diverging counts for branches. Please try again.

This is probably a proxy problem, so you need to check whether the proxy settings are correct. My problem is that I installed an ad plug-in (Adblock plus – a free ad blocker) in chrome, which blocks the normal access to web pages, so I just need to suspend the use of this plug-in.

After closing, all access is normal.

Error in pushing git code to gitee by vscode:! [remote rejected] Master – > Master (pre receive hook declined)

Error reporting environment: vscode + git 2.28.0. Windows. 1 + gitee code management

Error content:

When using vscode to push code to gitee, use git push origin develop:develop After , the following error occurred.

// An highlighted block
remote: This repository(including wiki) size 1418.54 MB, exceeds 1024.00 MB.
remote: Push rejected for repository size exceeds limit.
remote: HelpLink:           https://gitee.com/help/······
remote: Repository GC:      https://gitee.com/······
remote: Enterprise Edition: https://gitee.com/······
To gitee.com:filename.git
 ! [remote rejected] develop -> develop (pre-receive hook declined)
error: failed to push some refs to 'gitee.com:filename.git'

resolvent:

The total number of warehouse files in gitee is too large, which exceeds the upper limit of gitee storage. After streamlining the warehouse files, successfully push .

GitLab You are not allowed to push code to this project

There is a bug in the Gitlab CE 10.6.4 I used. When an empty project is created, the owner account is used to set the local project as git pushand the error “You are not allowed to push code to this project” will be encountered.
Because it’s an empty project, it doesn’t even have a Master branch yet, so it’s not really the Protect Branch.
The cause of this problem is that the git push GitLab is reading another incorrect username in Manage Windows Credentials on Windows and is rejected by GitLab.
When git pushyou will be prompted for the user name and password. After you enter the owner’s user name and password, you will be able to successfully git push.
This should be a design flaw of GitLab, which is that GitLab assumes that on a GitLab, you always have one account to log in to.
Reference: https://gitlab.com/gitlab-com/support-forum/issues/207
If you encounter similar permissions problems with GitLab (too large or too small or denied), you can first check that the Credential of GitLab in Manage Windows Credentials is incorrect.

Solution of gitlab 502 problem I encountered

GitLab was configured on Ali Cloud today, but the error 502 error kept coming up.

502
GitLab is not responding.
Please contact your GitLab administrator if this problem persists.


After searching for one afternoon, a mistake was finally found. It turned out that a Tomcat service was opened on the server and occupied port 8080, which made the Unicorn service of GitLab unable to be opened.
is finally modified as follows in /etc/gitlab/gitlab.rb

unicorn['port'] = 9090

Then gitlab-ctl reconfigure restart the configuration so that the gitlab server is up and running.


Here, write down the general process of solving the problem, and count it as a good experience for yourself.
install GitLab, start service, 502 error found. This is the beginning of the search for solutions to various Baidu.
1. Find the /var/log/gitlab/nginx in the error log file, found the following error /var/opt/gitlab/gitlab - rails/sockets/gitlab socket failed (2: No such file or directory), and then use the nc command to create the socket file, the final permission is set to SRWXRWXRWX , users and groups are set to git:git, but found that this method does not work.
2. When I ran to the GitLab website to find a solution, https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
CTRL + f 502 find the official tutorial says 502 problems

Note that on a single-core server it may take up to a minute to restart Unicorn and Sidekiq. Your GitLab instance will give a 502 error until Unicorn is up again.
It is also possible to start, stop or restart individual components.
sudo gitlab-ctl restart sidekiq
Unicorn supports zero-downtime reloads. These can be triggered as follows:
sudo gitlab-ctl hup unicorn
Note that you cannot use a Unicorn reload to update the Ruby runtime.

Try using the above two commands and find that it doesn't work. When I got angry, I kept typing gitlab-ctl status until I found that unicorn pid was getting bigger all the time. The PID for the other services has not changed.
3. Now we've almost found the problem -- unicorn's question. For the official tutorial, you can use gitlab-ctl tail unicorn to track the unicorn's status. Unfortunately, when we discovered that port 8080 was occupied, the unicorn's status was reported to have been captured

E, [2015-02-11T17:27:57.818492 #26687] ERROR -- : adding listener failed addr=127.0.0.1:8080 (in use)
E, [2015-02-11T17:27:57.818621 #26687] ERROR -- : retrying in 0.5 seconds (4 tries left)
E, [2015-02-11T17:27:58.318902 #26687] ERROR -- : adding listener failed addr=127.0.0.1:8080 (in use)
E, [2015-02-11T17:27:58.318998 #26687] ERROR -- : retrying in 0.5 seconds (3 tries left)
E, [2015-02-11T17:27:58.819309 #26687] ERROR -- : adding listener failed addr=127.0.0.1:8080 (in use)
E, [2015-02-11T17:27:58.819423 #26687] ERROR -- : retrying in 0.5 seconds (2 tries left)
E, [2015-02-11T17:27:59.319954 #26687] ERROR -- : adding listener failed addr=127.0.0.1:8080 (in use)
E, [2015-02-11T17:27:59.320076 #26687] ERROR -- : retrying in 0.5 seconds (1 tries left)

4. Well, here's the problem. The choice then became whether to kill the original 8080 port service or to change the unicorn port. This depends on your specific needs. I've changed the unicorn port to 9090, and the method is the one described at the beginning.