Tag Archives: java

Surprised by Github; their RSA SSH host key has been updated in the last week of March

Trying to push some new code to github, I’ve received the following thing:

PS D:\projects\SimpleBank> git push -u origin main -v
Pushing to github.com:andonescu/tpg-simple-bank.git
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:uNiVztksCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s.
Please contact your system administrator.
Add correct host key in /c/Users/en_ia/.ssh/known_hosts to get rid of this message.
Offending RSA key in /c/Users/en_ia/.ssh/known_hosts:1
RSA host key for github.com has changed and you have requested strict checking.
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

It looks like things have changed: https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/

To overpass this locally, the solution is simple (just to remove the old key):

ssh-keygen -R github.com

java opts

Useful java opts used by my servers … with time, permSize value will increase

-Xms512m -Xmx1024m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC

How to run a java class using maven

If you want to run a java class using maven, you can do it in this way:

time mvn -Dexec.classpathScope=runtime "-Dexec.args=-classpath %classpath
ro.www.operations.StaticAds" -Dexec.executable=java process-classes
org.codehaus.mojo:exec-maven-plugin:1.2:exec