gitlab 创建SSH Keys 报500错 看了一下日志 root@322323:/home/git/gitlab/log# cat production.log
Errno::ENOMEM (Cannot allocate memory - ssh): lib/gitlab/popen.rb:23:in `popen' lib/gitlab/key_fingerprint.rb:42:in `explicit_fingerprint_algorithm?' lib/gitlab/key_fingerprint.rb:21:in `block in fingerprint' lib/gitlab/key_fingerprint.rb:15:in `fingerprint' app/models/key.rb:77:in `generate_fingerprint' app/controllers/profiles/keys_controller.rb:21:in `create' lib/gitlab/middleware/go.rb:16:in `call'
google 了一翻:http://stackoverflow.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: 1.8G 1.7G 66M 14M 1.7M 169M -/+ buffers/cache: 1.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=1024 count=2000000 2000000+0 records in 2000000+0 records out 2048000000 bytes (2.0 GB) copied, 36.5222 s, 56.1 MB/s [root@iZ23arpt7f0Z swapfile]# mkswap -f swap Setting up swapspace version 1, size = 1999996 KiB no label, UUID=fd976699-b7e4-471f-82fb-8d784793d82f [root@iZ23arpt7f0Z swapfile]# swapon swap swapon: /swapfile/swap: insecure permissions 0644, 0600 suggested. [root@iZ23arpt7f0Z swapfile]# free -h total used free shared buff/cache available Mem: 1.8G 1.5G 62M 14M 263M 159M Swap: 1.9G 0B 1.9G
这下就ok了