Subversion: Get ip-address of user in pre-commit hook?

前端 未结 2 1976
旧巷少年郎
旧巷少年郎 2020-12-21 11:53

We\'re hosting a subversion repository for distrubuted software development. So non-employees have access to some of our sorce code. Our company\'s IT security policy requir

2条回答
  •  失恋的感觉
    2020-12-21 12:26

    Let me imagine that you write your hook in Perl, in that case, you can use the following lib : DocumentationClientIP

    you can install the lib from Git thru this link : GITClientIP (or use the code included).

    After installation, you need to add something like that in your code :

        use SVN::Utils::ClientIP qw(ssh_client_ip);
    
        print "The client's IP address is ", ssh_client_ip();
    

提交回复
热议问题