Category Archives: Linux

Jenkins SVN auto release scripts always prompt for solutions that need to store passwords

Error information:

ATTENTION!  Your password for authentication realm:

   <http://192.168.2.49:81> VisualSVN Server

can only be stored to disk unencrypted!  You are advised to configure
your system so that Subversion can store passwords encrypted, if
possible.  See the documentation for details.

You can avoid future appearances of this warning by setting the value
of the 'store-plaintext-passwords' option to either 'yes' or 'no' in
'/var/lib/jenkins/.subversion/servers'.
-----------------------------------------------------------------------
Store password unencrypted (yes/no)?svn: E070014: Unable to connect to a repository at URL 'http://192.168.2.49:81/svn/JgwPlatform/platform-codecenter/platform-common-code'
svn: E070014: Can't read stdin: End of file found
Build step 'Execute shell' marked build as failure

Solution:
  svn parameter: --no-auth-cache : do not cache authentication tokens
When executing the command: /usr/bin/svn update --username slq --password 112233 --no-auth-cache

[How to Solve] SSL handshake failed: SSL error

SSL handshake failed: SSL error: key usage violation in certificate has been detected appears when downloading the source code of SVN linked with HTTPS on Linux server

The reason for the error is that the certificate used by windows is not recognized by Linux

Add the following registry value to the windows registry: (mine is 64 bit)

for 32-bit system: (run regedit – > Find the following registry key – > Add a value of type DWORD)

[HKEY_LOCAL_MACHINE\SOFTWARE\VisualSVN\VisualSVN Server]
"CreateGnuTLSCompatibleCertificate"=dword:00000001

for 64-bit system:

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\VisualSVN\VisualSVN Server]
"CreateGnuTLSCompatibleCertificate"=dword:00000001

StartVisualSVN Server Manager.(Open virsualSVN server)

Go toAction | Properties | Certificate.

ClickChange certificate…

Select Create new self-signed cetificate.

Next all.

If you run svn again on Linux, you will be prompted with a warning that the certificate generator is not trusted, just select Accept Permanently.

Solve the problem that SVN update generates node remains in conflict

[root@localhost svnrepos]# svn up.
Updating’.’:
Skipped’pythonresource.txt’ – Node remains in conflict
At revision 14.
Summary of conflicts:
Skipped paths: 1

The solution is:
[root@localhost svnrepos]svn revert –depth=infinity pythonresource.txt
Reverted’pythonresource.txt’
[root@localhost svnrepos] svn up.
Reverted’pythonresource.txt’

After editing pythonresource.txt and commit locally again, go to the web server and svn up pythonresource.txt, everything is normal.

Or copy pythonresource.txt locally to another directory, commit, then copy pythonresource.txt to the original directory, and commit again. No error will be reported on the http server.

 

If it still doesn’t work, try a trick:

svn remove --force filename
svn resolve --accept=working filename
svn up

 

[Hyper-V] Virtual Machine the image’s hash and certificate are not allowed [How to Solve]

According to the plan, we need to install a Linux system on the virtual machine to serve as the server for web architecture learning

The server of the company project uses Linux system, and the specific version is unknown. Although we don’t need to pay attention to the final deployment in our development, we have a certain understanding of it. Java web is usually deployed on Linux, so we chose Linux. As for the specific version, the final choice is CentOS

The choice of virtual machine is mainly VMware and VirtualBox. Because VMware had to charge, VirtualBox was downloaded. Did not expect to create a system, there is no linux64 option. Online a check, need to turn on a switch of the BIOS, or other complex operation, feel a bit troublesome. However, in the process of searching, we found that win10 comes with Hyper-V, so we quickly called it out. After some basic configuration, we loaded the ISO of CentOS system

The image’s hash and certificate are not allowed. Fortunately, Baidu know to help me solve this problem: close hyper_ Safe boot options for this virtual machine in V. After closing, you can install 64 bit CentOS, and immediately like the answer

The system is finally installed. Try xshell and winscp, but also very easy to use. However, it seems that the configuration of the virtual machine system is not suitable. Win10 reveals that there is not enough memory and some processes with high memory usage need to be shut down. These problems can be solved later

By the way, I know how to use vim and Emacs. The introduction of vim is relatively simple, but it’s a little confused when switching from command mode to insert mode. It’s really hard to guess the three switching modes of insert, a and I without looking at the guide

Emacs is more troublesome, first download the source code, and then compile. In the process of compilation, one after another problems appeared, such as configuration: error: NO x toolkit could be found. I didn’t want to bother, so I added — with-x-toolkit = no and other settings one by one, and finally compiled successfully. I didn’t expect that when it started to run, it was still muddled and could not be used at all. Better use VIM first. Emacs later

[Soved] The following untracked working tree files would be overwritten by merge

Git pull encountered such a problem:

The following untracked working tree files would be overwritten by merge:.idea/vcs.xml

Solution:
git clean – D – FX

Note: will delete not add to the warehouse file, operation remember careful, lest change the file lost. In essence, it is to operate the untraceable local
$git clean – F – n # 1 in the warehouse

$ git clean -f -n # 1

$ git clean -f            # 2

$ git clean -fd          # 3

$ git clean -fX          # 4

$ git clean -fx          # 5

(1): The -n option will show which files will be removed when (2) is executed.

(2): This command will remove all the files shown in command (1).

(3): If you also want to remove file pieces, use the option -d.

(4): If you only want to remove files that have been ignored, use option -X.

(5): If you want to remove both ignored and unignored files, use option -x.

Git Submit Error: The file will have its original line endings in your working directory.

Error reporting

This error is found when git add

Error analysis

Depending on the situation, it should be caused by the inadequate recognition of line feed by different systems

As far as common sense is concerned, the file is generated under windows, so the newline is really different from Linux, which may be caused by this

Error report solution

git config --global core.autocrlf false

In the same way, we should also do related operations in pychar

If you select fix and commit, it will be set to true and will be converted

So we have to choose commit as LS

Additional supplement

Line ending in Git

Core.autocrlf is the variable responsible for processing line ending in GIT. It can set three values: true, false and inout

(1) Set to true [config — global core. Autocrlftrue]

When set to true, this means that whenever you add a file to the GIT repository, GIT will treat it as a text file

It will turn CRLF into LF

(2) Set to false [config — global core. Autocrlffalse]

When set to false, line endings will not do conversion. The text file remains the same

(3) When it is set to input, GIT programs the CRLF to input when git repository is added. When someone checks the code, it’s still in LF mode. Therefore, in the window operating system, do not use this setting

Git push Warning: The authenticity of host ‘github.com (52.74.223.119)’ can’t be established.

The problem:

Created a remote repository on github and pushed my code to it git push -u origin master with the following error

The authenticity of host ‘github.com (52.74.223.119)’ can’t be established.

RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.

Are you sure you want to continue connecting (yes/no)?yes

Warning: Permanently added ‘github.com,52.74.223.119’ (RSA) to the list of known hosts.

[email protected]: Permission denied (publickey).

fatal: Could not read from remote repository.

Reason for the problem: Github and ssh connection requires a key

 

Solution:

1. local mac public key path to get the key: cd ~/.ssh (id_rsa.pub)

2. Login to your own github into the project repository —- into setting —- Deploy keys

3. When configuring the ssh key, check the following Allow write access, the deploy key section in settings to have read and write permissions

4. After the configuration is complete and then go to the project to operate git can

Solution:

git push -u origin master

Enumerating objects: 3, done.

Counting objects: 100% (3/3), done.

Writing objects: 100% (3/3), 218 bytes | 109.00 KiB/s, done.

Total 3 (delta 0), reused 0 (delta 0)

To git+ssh://github.com/illusion1010/Hog.git

* [new branch] master -> master

Branch ‘master’ set up to track remote branch ‘master’ from ‘origin’.

linux Generated when decompressing .tar.gz files gzip: stdin: not in gzip format tar: /Child returned status 1 tar: Error is no…

Problem Description: today on Linux system through wgethttp://downloads.souceforge.net/tcl/tcl8.6.1-src.tar.gz After downloading resources from the Internet, the following error is generated through tar – zxvftcl8.6.1-src.tar.gz

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

(PS: later, after checking, it was found that there was a spelling problem in SourceForge, but Baidu found that not only spelling errors would lead to the above problems, but if the link failed or the jump link was a simple web page, it would also affect the download, so it was necessary to record the solution process.)

Solution process:

1. After checking http://downloads.souceforge.net/tcl/tcl8.6.1-src.tar.gz The website learned that there was a problem with the link jump

2. Search tcl8.6.1-src.tar.gz to enter TCL official website

3. Copy http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz The website can be used as the download link

4. Or click the above web address, automatically jump to the following page, wait for 5 seconds, and automatically jump out of the download prompt window, copy the pop-up web address:

https://nchc.dl.sourceforge.net/project/tcl/Tcl/8.6.1/tcl8.6.1-src.tar.gz It can also be used as a download link

5. After installation, unzip the. Tar.gz package tar – zxvf tcl8.6.1-src.tar.gz

6. Switch Directory: CD tcl8.6.1/unix

7../configure// execute the configure file

8. Make// compile

9. Make install// install

10. – zxvf is the tar command decompression syntax:

-X unpack. Tar file

-V display details

-F specifies the decompression file

-Z decompression

Example: $tar – zxvf dir1.tar.gz

Git Fatal: The remote end hung up unexpectedly [How to Solve]

When using git to update or submit a project, “fatal: the remote end hung up unexpectedly” appears because the pushed file is too large

That’s simple, either the cache is not enough, or the network is not good, or the wall is the reason

Especially when the resource pool is abroad. This problem may be caused by the network

Method 1:

Modify the commit cache size to 500m or larger

git config –global http.postBuffer 524288000

# some comments below report having to double the value:

git config –global http.postBuffer 1048576000

Or modify the generated config file under the. Git directory generated by clone/create version library and add it as follows:

[http]
postBuffer = 524288000

It is amended as follows:

Then push again

Method 2:

Configure the minimum speed and minimum speed time of GIT:

Git config — global http.lowspeedlimit 0
git config — global http.lowspeedtime 999999 unit second
— the global configuration is effective for the current user. If it needs to be effective for all users, use — system

Method 3:
fatal: the remote end hung up unexpected lyb | 2.00 KIB/s

Mine is like this, with | 2.00kib/s at the back

This sentence shows that the remote end is suspended | 2kib/s

It should be due to the wall that the network speed is too slow, and the project is a little too big to upload

git this exceeds GitHub’s file size limit of 100.00 MB

git push origin master During the process, the following error occurs

Keywords: this exceeds GitHub’s file size limit of 100.00 MB

Ignore file operations when pushing: (ignore large file operations.gitignore is not good when), before pushing after commit, enter the command.

git filter-branch –force –index-filter “git rm –cached –ignore-unmatch 01_reference/case/222.wmv 01_reference/case/111.xlsx” –prune-empty –tag-name-filter cat — –all

git commit –amend -CHEAD

git push origin master

 git filter-branch --force --index-filter "git rm --cached --ignore-unmatch 01_reference/case/222.wmv  01_reference/case/111.xlsx"  --prune-empty --tag-name-filter cat -- --all