MacOS 安装dmg包

macuusafe-emmdeMac-mini:JDK 7 Update 79 macuusafe-emm$ hdiutil attach jdk-7u79-macosx-x64.dmg
macuusafe-emmdeMac-mini:JDK 7 Update 79 macuusafe-emm$ cd /Volumes/JDK\ 7\ Update\ 79/
macuusafe-emmdeMac-mini:JDK 7 Update 79 macuusafe-emm$ sudo installer -pkg JDK\ 7\ Update\ 79.pkg -target /
installer: Package name is JDK 7 Update 79
installer: Installing at base path /
installer: The install was successful.
macuusafe-emmdeMac-mini:JDK 7 Update 79 macuusafe-emm$ ls /Library/Java/JavaVirtualMachines
jdk1.7.0_79.jdk
macuusafe-emmdeMac-mini:JDK 7 Update 79 macuusafe-emm$

macuusafe-emmdeMac-mini:ios_pack macuusafe-emm$ hdiutil attach mysql-5.7.21-macos10.13-x86_64.dmg
正在检查“Protective Master Boot Record (MBR : 0)”的校验和…
Protective Master Boot Record (MBR ::已验证 CRC32 $DCB572A5
正在检查“GPT Header (Primary GPT Header : 1)”的校验和…
GPT Header (Primary GPT Header : 1):已验证 CRC32 $418CB3C3
正在检查“GPT Partition Data (Primary GPT Table : 2)”的校验和…
GPT Partition Data (Primary GPT Tabl:已验证 CRC32 $D49546F2
正在检查“ (Apple_Free : 3)”的校验和…
(Apple_Free : 3):已验证 CRC32 $00000000
正在检查“disk image (Apple_HFS : 4)”的校验和…
……………………………………………………………………………………………………………………………………
disk image (Apple_HFS : 4):已验证 CRC32 $DBE22405
正在检查“GPT Partition Data (Backup GPT Table : 5)”的校验和…
GPT Partition Data (Backup GPT Table:已验证 CRC32 $D49546F2
正在检查“GPT Header (Backup GPT Header : 6)”的校验和…
GPT Header (Backup GPT Header : 6):已验证 CRC32 $AFD7997F
已验证 CRC32 $2B51A346
/dev/disk3 GUID_partition_scheme
/dev/disk3s1 Apple_HFS /Volumes/mysql-5.7.21-macos10.13-x86_64
macuusafe-emmdeMac-mini:ios_pack macuusafe-emm$ cd /Volumes/mysql-5.7.21-macos10.13-x86_64
macuusafe-emmdeMac-mini:mysql-5.7.21-macos10.13-x86_64 macuusafe-emm$ ls
mysql-5.7.21-macos10.13-x86_64.pkg
macuusafe-emmdeMac-mini:mysql-5.7.21-macos10.13-x86_64 macuusafe-emm$ sudo installer -pkg mysql-5.7.21-macos10.13-x86_64.pkg -target /
Password:
installer: Package name is MySQL 5.7.21-community
installer: Installing at base path /
installer: The install was successful.
macuusafe-emmdeMac-mini:mysql-5.7.21-macos10.13-x86_64 macuusafe-emm$ ls /usr/local/
.com.apple.installer.keep mysql/ mysql-5.7.21-macos10.13-x86_64/
macuusafe-emmdeMac-mini:mysql-5.7.21-macos10.13-x86_64 macuusafe-emm$ ls /usr/local/mysql-5.7.21-macos10.13-x86_64/
COPYING README bin/ data/ docs/ include/ keyring/ lib/ man/ share/ support-files/
macuusafe-emmdeMac-mini:mysql-5.7.21-macos10.13-x86_64 macuusafe-emm$ ls /usr/local/mysql-5.7.21-macos10.13-x86_64/bin/
innochecksum mysql mysql_secure_installation mysqld mysqlpump resolve_stack_dump
lz4_decompress mysql_client_test_embedded mysql_ssl_rsa_setup mysqld-debug mysqlshow resolveip
my_print_defaults mysql_config mysql_tzinfo_to_sql mysqld_multi mysqlslap zlib_decompress
myisam_ftdump mysql_config_editor mysql_upgrade mysqld_safe mysqltest_embedded
myisamchk mysql_embedded mysqladmin mysqldump mysqlxtest
myisamlog mysql_install_db mysqlbinlog mysqldumpslow perror
myisampack mysql_plugin mysqlcheck mysqlimport replace
macuusafe-emmdeMac-mini:mysql-5.7.21-macos10.13-x86_64 macuusafe-emm$ ls /usr/local/mysql-5.7.21-macos10.13-x86_64/support-files/
magic mysql-log-rotate mysql.server mysqld_multi.server
macuusafe-emmdeMac-mini:mysql-5.7.21-macos10.13-x86_64 macuusafe-emm$ cd /usr/local/mysql-5.7.21-macos10.13-x86_64/support-files/
macuusafe-emmdeMac-mini:support-files macuusafe-emm$ ls
magic mysql-log-rotate mysql.server mysqld_multi.server
macuusafe-emmdeMac-mini:support-files macuusafe-emm$ ./mysql.server start
Starting MySQL
./usr/local/mysql/bin/mysqld_safe: line 647: /usr/local/mysql/data/macuusafe-emmdeMac-mini.local.err: Permission denied
Logging to ‘/usr/local/mysql/data/macuusafe-emmdeMac-mini.local.err’.
/usr/local/mysql/bin/mysqld_safe: line 144: /usr/local/mysql/data/macuusafe-emmdeMac-mini.local.err: Permission denied
/usr/local/mysql/bin/mysqld_safe: line 198: /usr/local/mysql/data/macuusafe-emmdeMac-mini.local.err: Permission denied
/usr/local/mysql/bin/mysqld_safe: line 906: /usr/local/mysql/data/macuusafe-emmdeMac-mini.local.err: Permission denied
rm: /usr/local/mysql/data/macuusafe-emmdeMac-mini.local.pid.shutdown: Permission denied
/usr/local/mysql/bin/mysqld_safe: line 144: /usr/local/mysql/data/macuusafe-emmdeMac-mini.local.err: Permission denied
ERROR! The server quit without updating PID file (/usr/local/mysql/data/macuusafe-emmdeMac-mini.local.pid).
macuusafe-emmdeMac-mini:support-files macuusafe-emm$ sudo ./mysql.server start
Starting MySQL
.Logging to ‘/usr/local/mysql/data/macuusafe-emmdeMac-mini.local.err’.
SUCCESS!
macuusafe-emmdeMac-mini:support-files macuusafe-emm$ netstat -an|grep 3306
tcp46 0 0 *.3306 *.* LISTEN
macuusafe-emmdeMac-mini:support-files macuusafe-emm$

macuusafe-emmdeMac-mini:support-files macuusafe-emm$ vim ~/.bash_profile
macuusafe-emmdeMac-mini:support-files macuusafe-emm$ cat ~/.bash_profile
export LANG=en_US.UTF-8
export PATH=${PATH}:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin:/usr/local/mysql-5.7.21-macos10.13-x86_64/bin
macuusafe-emmdeMac-mini:support-files macuusafe-emm$
macuusafe-emmdeMac-mini:support-files macuusafe-emm$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
macuusafe-emmdeMac-mini:support-files macuusafe-emm$ source ~/.bash_profile
macuusafe-emmdeMac-mini:support-files macuusafe-emm$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin:/usr/local/mysql-5.7.21-macos10.13-x86_64/bin

nginx 解决首页跳转问题

nginx和tomcat负载均衡


比如 www.csdn.net 网站后面有 2个tomcat。
配置负载均衡:

upstream csdn-tomcat{
    server 192.168.100.101:8080;
    server 192.168.100.102:8080;
}
server {
  listen 80;
  server_name  www.csdn.net csdn.net;
  index  index.html;
  location  / {
    if ( $request_uri = "/" ) {
        rewrite "/" http://www.csdn.net/index.html break;
    }
    proxy_pass http://csdn-tomcat$request_uri;
  }
  # 301 redirect:
  location /blog/index.html {
    return 301 http://www.iteye.com$request_uri;
  }
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19

研究好半天,终于解决了。
首先假设首页上面是一个静态的html。
当用户没有直接输入 www.csdn.net的时候进行 301 跳转。
引导用户到 www.csdn.net/index.html 首页。
其他动态请求打到tomcat上面。
这样的在nginx上面直接做了301 跳转。

这样解决的是问题是由于tomcat 是用spring做的。
后缀成.html了,没有办法区分tomcat 和 普通html了。
要是tomcat 的后缀成.do就好办了。

主要是为了减轻 tomcat的压力。将html css image 都交给nginx去处理。
但是上线的时候比较麻烦,分开上线。

——————— 本文来自 freewebsys 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/freewebsys/article/details/51277923?utm_source=copy

Nginx通过二级目录(路径)映射不同的反向代理,规避IP+端口访问

这是我上一家公司的案例总结,发现躺在草稿箱好几个月了,今天得空就整理发布一下。

先说一下开发那边提来的 2 个 case:

①、同一个域名需要反向代理到前台和后台(不同机器和端口);

②、需要采用 IP+端口的模式,嵌入到 APP 作为 DNS 污染后的备选方案。

Nginx通过二级目录(路径)映射不同的反向代理,规避IP+端口访问

对于第①个问题,很好解决:通过区分二级目录来反代不同的节点即可,所以代码类似如下:

如上配置即可实现通过一个域名来反代不同的后端节点,用到的思路就是匹配二级目录来反代。

对于第②个问题,可能粗略一看,还没理解是个啥意思吧!

其实就是现在业界流行的一种防 DNS 污染的解决方案之一:手机 APP 里面除了通过域名来获取数据,还会额外嵌入一些备用的 IP。APP 在获取数据时,会先通过域名向服务器发起一个简单的校验请求,如果得到的不是预期数据,说明该网络环境下的 DNS 已被污染,比如被运营商劫持,请求 A 内容却给你展示 B 内容!这时候,APP 将会启动备用预案,通过 IP 的方式来请求数据!很明显,这个做法可以有效避免恶心的 DNS 劫持了(看完这段是不是有所收获呢?)。

做法很简单,就是在 APP 中集成多个 IP 和端口作为备用的访问途径。

当开发 GG 找到我,提出的需求是:

需要实现公网 IP+端口来访问,比如邮件 API 使用 http://192.168.1.10:125

Ps:公网服务器是多线的,那么就有多个 IP,本文假设电信是 192.168.1.10,联通是 192.168.2.10,移动是 192.168.3.10 等

说白了就是要用端口来区分不同的 API,此时如果我不深究,顺手可能会写出如下配置:

粗略一看,确实是可以实现开发 GG 的要求啊!再仔细一想,你会发现如此做法会开放越来越多的端口!运维成本以及辨识度低还只是其次,咱说好的安全第一呢?

经过思考和测试,我写出的最终配置如下:

最终实现的效果就是:你要通过 IP 请求邮件 API,只要请求 http://192.168.1.1/mail_api/ 即可,而不需要开放多余端口。而且,后续要新增更多 API,只需要定义不同的二级路径即可,这些二级路径的辨识度可比端口要好得多!

Ps:正如代码中的注释,示例代码只用了一个 DemoBackend 节点配置,为的是分享另一个小技巧:当后端节点承载了多个站点而且都是监听 80 端口时(比如某些小公司同一个 IIS 服务器部署了 N 个站点),反向代理中的 proxy_set_header 参数,可以自定义传递一个 host 域名给后端节点,从而正确响应预期内容!

这段解释有点无力,还是拿实际例子举例吧!

我之前供职的公司节点用的是 IIS 服务器,前端用 Nginx 反向代理,IIS 服务器上有多个站点,站点之间部分会通过 rewrite 规则联系起来。

打个比方:比如 A 网站有个专题内容(www.a.com/zt/)是通过 IIS 伪静态映射到了 B 网站(content.b.com)。也就是访问到 http://www.a.com/zt/,其实最后是通过 A 网站映射到了 B 网站上面。

后来发现 IIS 有个伪静态 BUG,会经常奔溃,就要我用前端的 Nginx 来实现直接映射,而不再走 IIS 的 A 网站中转。

那么这个需求就正好用到了 proxy_set_header 技巧,一看就懂:

很明显,通过传递自定义域名,就可以实现通过 A 网站访问 Nginx,返回 B 网站内容,和反向代理谷歌的原理是一致的。

当然,上文为了实现 IP 和域名都可以访问,这个 proxy_set_header 设置也是必须的。说白了就是在反代过程中,对后端服务器伪装(传递)了一个自定域名,让后端响应该域名预期内容。

当然,在之前张戈博客分享的《分享几个 WordPress 本地缓存 gravatar 评论头像的方案》一文中也用到了这个技巧,感兴趣的朋友可以前往查看。

本文分享的经验,其实比较简单,主要就是通过不同路径来反代不同的目标。估计很多大拿早就用烂了吧!不过值得注意的是,通过自定义路径反代,需要注意 proxy_pass 参数后面是否需要斜杠,避免将自定义的路径传递到后端节点,导致访问 404!

nginx 跳转方法

Nginx搭建了一个https访问的虚拟主机,监听的域名是itlnmp.com,但是很多用户不清楚https和http的区别,会很容易敲成http://itlnmp.com,这时会报出404错误,所以我需要做基于itlnmp.com域名的http向https的强制跳转

我总结了两种方式,跟大家共享一下

一、nginx的rewrite方法

思路这应该是大家最容易想到的方法,将所有的http请求通过rewrite重写到https上即可,配置如下

server { 
    listen  80;  
    server_name www.itlnmp.com; 
    rewrite ^(.*)$  http://$host$1 permanent;  
}
server {
     listen 443;
     server_name www.itlnmp.com;
     root /www;
     ssl on;
     ssl_certificate /etc/nginx/certs/server.crt;
     ssl_certificate_key /etc/nginx/certs/server.key;
 }

搭建此虚拟主机完成后,就可以将http://www.itlnmp.com的请求全部重写到http://www.itlnmp.com上了

二、index.html刷新网页

上述两种方法均会耗费服务器的资源,我们用curl访问baidu.com试一下,看百度的公司是如何实现baidu.com向www.baidu.com的跳转
可以看到百度很巧妙的利用meta的刷新作用,将baidu.com跳转到www.baidu.com.因此我们可以基于http://www.itlnmp.com的虚拟主机路径下也写一个index.html,内容就是http向https的跳转
1、index.html
<html>
<meta http-equiv="refresh" content="0;url=http://www.itlnmp.com/">
</html>

2、Nginx虚拟主机配置

server {
    listen 80;
    server_name www.itlnmp.com;
    location / {
                #index.html放在虚拟主机监听的根目录下
        root /www;
    }
        #将404的页面重定向到https的首页
    error_page  404 http://www.itlnmp.com/;
}

server {
     listen 443;
     server_name www.itlnmp.com;
     root /www;
     ssl on;
     ssl_certificate /etc/nginx/certs/server.crt;
     ssl_certificate_key /etc/nginx/certs/server.key;
 }

mac mysql: error You must reset your password using ALTER USER statement before executing this statement.

安装完mysql 之后,登陆以后,不管运行任何命令,总是提示这个

step 1: SET PASSWORD = PASSWORD(‘your new password’);

step 2: ALTER USER ‘root’@’localhost’ PASSWORD EXPIRE NEVER;

step 3: flush privileges;

完成以上三步退出再登,使用新设置的密码就行了,以上除了红色的自己修改成新密码外,其他原样输入即可

参考1: https://dev.mysql.com/doc/refman/5.6/en/alter-user.html

参考2: http://dev.mysql.com/doc/refman/5.7/en/password-expiration-policy.html

参考3: http://stackoverflow.com/questions/33467337/reset-mysql-root-password-using-alter-user-statement-after-install-on-mac

git push 错误:remote: ERROR: committer email address remote: ERROR: does not match your user account.”

链接:https://blog.csdn.net/npjocj/article/details/31735605

 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-29-generic x86_64)
Apache 2.2
Gerrit:2.8.4
Jenkins:Jenkins ver. 1.559

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Q1. Gerrit “publish and submit” 后冲突“Your change could not be merged due to a path conflict.Please merge (or rebase) the change locally and upload the resolution for review.“

A1.
这个是因为之前我把原来的项目删除后重新创建一个同名的项目,因为数据库里还存有原来的change-ID信息
 
Q2.” remote: ERROR:  committer email address  remote: ERROR:  does not match your user account.”
  1. remote: Processing changes: refs: 1, done
  2. remote:
  3. remote: ERROR: In commit 0059c6b3c1c60fcc3e7863fa62f7d19b0b69afcd
  4. remote: ERROR: committer email address joey.zhang@mail.com
  5. remote: ERROR: does not match your user account.
  6. remote: ERROR:
  7. remote: ERROR: The following addresses are currently registered:
  8. remote: ERROR: joe.chan@mail.com
  9. remote: ERROR:
  10. remote: ERROR: To register an email address, please visit:
  11. remote: ERROR: http://172.16.147.2:8082/#/settings/contact
  12. remote:
  13. remote:
  14. To ssh://gerritxmic/flagship.git
  15. ! [remote rejected] master -> master (invalid committer)
  16. error: failed to push some refs to ‘ssh://gerrit/test.git’

A2.需要配置 ‘Forge Committer’ 和 ‘Forge Author’ 访问权限, 让 Gerrit 忽略你不是正在 push 的提交的 author 或者 committer。直接把Anonymous Users组或者其他组给加上就行了。


 

——————— 本文来自 吉祥衰宝 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/npjocj/article/details/31735605?utm_source=copy

git push 错误:Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing unknown 5643da47ebc3c7800a9b61c0fc4d35a715292de6

git push 错误:

[2018-09-26 14:05:51,688] ERROR com.google.gerrit.sshd.BaseCommand : Internal server error (user jkadmin account 1000398) during git-receive-pack ‘/svnemm/emm.git’
com.google.gerrit.sshd.BaseCommand$Failure: fatal: Unpack error, check server log
at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:176)
at com.google.gerrit.sshd.AbstractGitCommand.service(AbstractGitCommand.java:101)
at com.google.gerrit.sshd.AbstractGitCommand.access$000(AbstractGitCommand.java:32)
at com.google.gerrit.sshd.AbstractGitCommand$1.run(AbstractGitCommand.java:70)
at com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:442)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:368)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Unpack error on project “svnemm/emm”:
AdvertiseRefsHook: org.eclipse.jgit.transport.AdvertiseRefsHookChain@1b821762class org.eclipse.jgit.transport.AdvertiseRefsHookChain

at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:175)
… 12 more
Caused by: org.eclipse.jgit.errors.UnpackException: Exception while parsing pack stream
at org.eclipse.jgit.transport.ReceivePack.service(ReceivePack.java:246)
at org.eclipse.jgit.transport.ReceivePack.receive(ReceivePack.java:161)
at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:115)
… 12 more
Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing unknown 5643da47ebc3c7800a9b61c0fc4d35a715292de6
at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:148)
at org.eclipse.jgit.lib.ObjectReader.open(ObjectReader.java:229)
at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:840)
at org.eclipse.jgit.transport.BaseReceivePack.checkConnectivity(BaseReceivePack.java:1110)
at org.eclipse.jgit.transport.BaseReceivePack.receivePackAndCheckConnectivity(BaseReceivePack.java:884)
at org.eclipse.jgit.transport.ReceivePack.service(ReceivePack.java:192)
… 14 more

解决:
gerrit 操作 H2数据库:

java -jar bin/gerrit.war gsql

gerrit> \d
List of relations
TABLE_SCHEM | TABLE_NAME | TABLE_TYPE
————+—————————–+———–
PUBLIC | ACCOUNTS | TABLE
PUBLIC | ACCOUNT_DIFF_PREFERENCES | TABLE
PUBLIC | ACCOUNT_EXTERNAL_IDS | TABLE
PUBLIC | ACCOUNT_GROUPS | TABLE
PUBLIC | ACCOUNT_GROUP_BY_ID | TABLE
PUBLIC | ACCOUNT_GROUP_BY_ID_AUD | TABLE
PUBLIC | ACCOUNT_GROUP_MEMBERS | TABLE
PUBLIC | ACCOUNT_GROUP_MEMBERS_AUDIT | TABLE
PUBLIC | ACCOUNT_GROUP_NAMES | TABLE
PUBLIC | ACCOUNT_PATCH_REVIEWS | TABLE
PUBLIC | ACCOUNT_PROJECT_WATCHES | TABLE
PUBLIC | ACCOUNT_SSH_KEYS | TABLE
PUBLIC | CHANGES | TABLE
PUBLIC | CHANGE_MESSAGES | TABLE
PUBLIC | PATCH_COMMENTS | TABLE
PUBLIC | PATCH_SETS | TABLE
PUBLIC | PATCH_SET_ANCESTORS | TABLE
PUBLIC | PATCH_SET_APPROVALS | TABLE
PUBLIC | SCHEMA_VERSION | TABLE
PUBLIC | STARRED_CHANGES | TABLE
PUBLIC | SUBMODULE_SUBSCRIPTIONS | TABLE
PUBLIC | SYSTEM_CONFIG | TABLE

gerrit> select * from PATCH_SETS limit 3;
REVISION | UPLOADER_ACCOUNT_ID | CREATED_ON | DRAFT | CHANGE_ID | PATCH_SET_ID
—————————————–+———————+————————-+——-+———–+————-
0fd976c31660b2b55773fe0ba2c8e7a2a1266d4d | 1000000 | 2015-03-28 10:18:41.016 | N | 1 | 1
ae2bfa444bd384449a1feff32b3907da6a21b0db | 1000000 | 2015-03-28 10:22:32.739 | N | 2 | 1
67309f0999e5a7328fbd78e53de03a80bd814066 | 1000000 | 2015-03-28 10:23:18.7 | N | 2 | 2
(3 rows; 3 ms)
gerrit>

gerrit> select * from PATCH_SETS where REVISION=’5643da47ebc3c7800a9b61c0fc4d35a715292de6′;
REVISION | UPLOADER_ACCOUNT_ID | CREATED_ON | DRAFT | CHANGE_ID | PATCH_SET_ID
—————————————–+———————+————————-+——-+———–+————-
5643da47ebc3c7800a9b61c0fc4d35a715292de6 | 1000435 | 2018-08-03 12:38:59.203 | N | 27196 | 1
(1 row; 1 ms)

gerrit> select * from changes where change_id=27196;
CHANGE_KEY | CREATED_ON | LAST_UPDATED_ON | SORT_KEY | OWNER_ACCOUNT_ID | DEST_PROJECT_NAME | DEST_BRANCH_NAME | OPEN | STATUS | CURRENT_PATCH_SET_ID | SUBJECT | TOPIC | LAST_SHA1_MERGE_TESTED | MERGEABLE | ROW_VERSION | CHANGE_ID
——————————————+————————-+————————-+——————+——————+——————-+————————-+——+——–+———————-+———————————————————————————————————————+——-+——————————————+———–+————-+———-
I088052dd76b608ab89797e2c44114736a3a63721 | 2018-08-03 12:38:59.203 | 2018-08-03 12:38:59.203 | 004ef3b600006a3c | 1000435 | svnemm/emm | refs/heads/emm_209_FPJK | Y | n | 1 | 1. 通讯审计增加“通话总时长”、“主叫时长”、 “被叫时长” 、“主叫次数”、“被叫次数” 2. 列默认展示姓名、用户组、通话总时长、主叫时长、 被叫时长、主叫次数、被叫次数、查看记录共八列 3. 按照通话总时长从大到小正序排列 | NULL | c658deb824618f7bd1695d0e9d7274cf96254a15 | N | 102 | 27196
(1 row; 0 ms)

gerrit> update changes set open=’N’,status=’A’ where change_id=27196;
UPDATE 1; 22 ms
gerrit>

gerrit> \q
Bye
svn@git:~/gerrit/review_site$
svn@git:~/gerrit/review_site$
svn@git:~/gerrit/review_site$
svn@git:~/gerrit/review_site$ ./bin/gerrit.sh start
Starting Gerrit Code Review: OK

再提交就OK了:
[root@bogon emm.git]# git push –mirror ssh://jkadmin@192.168.1.29:29418/svnemm/emm.git
Counting objects: 278884, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (88342/88342), done.
Writing objects: 100% (278884/278884), 1.59 GiB | 54.90 MiB/s, done.
Total 278884 (delta 172642), reused 278884 (delta 172642)
remote: Resolving deltas: 100% (172642/172642)
remote: Counting objects: 278883, done
remote: Processing changes: refs: 15, done
To ssh://jkadmin@192.168.1.29:29418/svnemm/emm.git
+ 976df1f…3dd5fee master -> master (forced update)
* [new branch] emm_209 -> emm_209
* [new branch] emm_209_FPJK -> emm_209_FPJK
* [new branch] emm_209_GSDX -> emm_209_GSDX
* [new branch] emm_209_JBT -> emm_209_JBT
* [new branch] emm_209_LD -> emm_209_LD
* [new branch] emm_209_PAPH -> emm_209_PAPH
* [new branch] emm_209_QZXX -> emm_209_QZXX
* [new branch] emm_209_RDJC -> emm_209_RDJC
* [new branch] emm_209_SDHK -> emm_209_SDHK
* [new branch] emm_209_WXB -> emm_209_WXB
* [new branch] emm_209_XMNS -> emm_209_XMNS
* [new branch] emm_209_YTSD -> emm_209_YTSD
* [new branch] emm_209_hmjy -> emm_209_hmjy
* [new branch] feature_mgr_saas -> feature_mgr_saas
[root@bogon emm.git]#

 

相关链接:
https://blog.csdn.net/zwwjs/article/details/33723557
https://www.2cto.com/database/201501/370968.html
https://zhidao.baidu.com/question/1605326285565924027.html
https://dongyupu.github.io/2016/12/21/Gerrit-Gerrit-Code-Review-Unpack-error-Missing-unknown/

https://www.cnblogs.com/ZhangRuoXu/p/6483307.html