gitlab 创建SSH Keys 报500错 看了一下日志 root@322323:/home/git/gitlab/log# cat production.log
Errno::ENOMEM (Cannot allocate memory - ssh):
lib/gitlab/popen.rb::in `popen'
lib/gitlab/key_fingerprint.rb::in `explicit_fingerprint_algorithm?'
lib/gitlab/key_fingerprint.rb::in `block in fingerprint'
lib/gitlab/key_fingerprint.rb::in `fingerprint'
app/models/key.rb::in `generate_fingerprint'
app/controllers/profiles/keys_controller.rb::in `create'
lib/gitlab/middleware/go.rb::in `call'
google 了一翻:http://*.com/questions/26777690/gitlab-500-error-when-adding-removing-ssh-key
root@904eb945eb34:/home/git/gitlab/log# free -h
total used free shared buffers cached
Mem: .8G .7G 66M 14M 1.7M 169M
-/+ buffers/cache: .6G 237M
Swap: 0B 0B 0B
[root@iZ23arpt7f0Z data]# mkdir /swapfile
[root@iZ23arpt7f0Z data]# cd /swapfile
[root@iZ23arpt7f0Z swapfile]# dd if=/dev/zero of=swap bs= count=
+ records in
+ records out
bytes (2.0 GB) copied, 36.5222 s, 56.1 MB/s
[root@iZ23arpt7f0Z swapfile]# mkswap -f swap
Setting up swapspace version , size = KiB
no label, UUID=fd976699-b7e4-471f-82fb-8d784793d82f
[root@iZ23arpt7f0Z swapfile]# swapon swap
swapon: /swapfile/swap: insecure permissions , suggested.
[root@iZ23arpt7f0Z swapfile]# free -h
total used free shared buff/cache available
Mem: .8G .5G 62M 14M 263M 159M
Swap: .9G 0B .9G
这下就ok了