Re: unable to install python-ldap

2013-02-11 Thread kapila narang
thanks Christian for the reply. But can you elaborate what you meant by
package manager here.
I installed from easy_install so what i m missing here?


On Tue, Feb 12, 2013 at 11:51 AM, Christian Hammond wrote:

> Looks like you're missing the appropriate LDAP development headers. You
> can likely get this from your package manager.
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> Review Board - http://www.reviewboard.org
> VMware, Inc. - http://www.vmware.com
>
> On Feb 11, 2013, at 10:20 PM, cmuser  wrote:
>
>
> Any help is appreciated.
> Error-
>
> $>easy_install python-ldap
>
> Searching for python-ldap
> Reading http://pypi.python.org/simple/python-ldap/
> Reading http://www.python-ldap.org/
> Best match: python-ldap 2.4.10
> Downloading
> http://pypi.python.org/packages/source/p/python-ldap/python-ldap-2.4.10.tar.gz#md5=a15827ca13c90e9101e5e9405c1d83be
> Processing python-ldap-2.4.10.tar.gz
> Running python-ldap-2.4.10/setup.py -q bdist_egg --dist-dir
> /tmp/easy_install-cI4tUz/python-ldap-2.4.10/egg-dist-tmp-O-OCjt
> defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
> extra_compile_args:
> extra_objects:
> include_dirs: /opt/openldap-RE24/include /usr/include/sasl /usr/include
> library_dirs: /opt/openldap-RE24/lib /usr/lib
> libs: ldap_r
> file Lib/ldap.py (for module ldap) not found
> file Lib/ldap/controls.py (for module ldap.controls) not found
> file Lib/ldap/extop.py (for module ldap.extop) not found
> file Lib/ldap/schema.py (for module ldap.schema) not found
> warning: no files found matching 'Makefile'
> warning: no files found matching 'Modules/LICENSE'
> file Lib/ldap.py (for module ldap) not found
> file Lib/ldap/controls.py (for module ldap.controls) not found
> file Lib/ldap/extop.py (for module ldap.extop) not found
> file Lib/ldap/schema.py (for module ldap.schema) not found
> file Lib/ldap.py (for module ldap) not found
> file Lib/ldap/controls.py (for module ldap.controls) not found
> file Lib/ldap/extop.py (for module ldap.extop) not found
> file Lib/ldap/schema.py (for module ldap.schema) not found
> In file included from Modules/LDAPObject.c:9:
> Modules/errors.h:8:18: error: lber.h: No such file or directory
> Modules/errors.h:9:18: error: ldap.h: No such file or directory
> In file included from Modules/LDAPObject.c:9:
> Modules/errors.h:12: error: expected â)â before â*â token
> In file included from Modules/LDAPObject.c:11:
> Modules/LDAPObject.h:12:2: error: #error Current python-ldap requires
> OpenLDAP 2.x
> In file included from Modules/LDAPObject.c:11:
> Modules/LDAPObject.h:23: error: expected specifier-qualifier-list before
> âLDAPâ
> Modules/LDAPObject.h:31: error: expected â)â before â*â token
> In file included from Modules/LDAPObject.c:12:
> Modules/ldapcontrol.h:11: error: expected â)â before â*â token
> Modules/ldapcontrol.h:12: error: expected declaration specifiers or â...â
> before âLDAPControlâ
> Modules/ldapcontrol.h:13: error: expected â)â before â*â token
> In file included from Modules/LDAPObject.c:13:
> Modules/message.h:11: error: expected â)â before â*â token
> In file included from Modules/LDAPObject.c:14:
> Modules/berval.h:10: warning: âstruct bervalâ declared inside parameter
> list
> Modules/berval.h:10: warning: its scope is only this definition or
> declaration, which is probably not what you want
> Modules/berval.h:12: warning: âstruct bervalâ declared inside parameter
> list
> Modules/berval.h:13: warning: âstruct bervalâ declared inside parameter
> list
> Modules/LDAPObject.c:18:18: error: sasl.h: No such file or directory
> Modules/LDAPObject.c:26: error: expected â)â before â*â token
> Modules/LDAPObject.c: In function âdeallocâ:
> Modules/LDAPObject.c:42: error: âLDAPObjectâ has no member named âldapâ
> Modules/LDAPObject.c:43: error: âLDAPObjectâ has no member named âvalidâ
> Modules/LDAPObject.c:44: error: âLDAPObjectâ has no member named â_saveâ
> Modules/LDAPObject.c:44: error: âLDAPObjectâ has no member named â_saveâ
> Modules/LDAPObject.c:45: warning: implicit declaration of function
> âldap_unbind_extâ
> Modules/LDAPObject.c:45: error: âLDAPObjectâ has no member named âldapâ
> Modules/LDAPObject.c:46: error: âLDAPObjectâ has no member named â_saveâ
> Modules/LDAPObject.c:46: error: âLDAPObjectâ has no member named â_saveâ
> Modules/LDAPObject.c:47: error: âLDAPObjectâ has no member named âvalidâ
> Modules/LDAPObject.c:49: error: âLDAPObjectâ has no member named âldapâ
> Modules/LDAPObject.c: In function ânot_validâ:
>
> pip freeze
> Django==1.4.3
> Djblets==0.7.10
> JCC==2.15
> Jinja2==2.6
> Markdown==2.2.1
> MySQL-python==1.2.4
> PIL==1.1.7
> Pygments==1.6
> RBTools==0.4.3
> ReviewBoard==1.7.5
> Sphinx==1.1.3
> django-evolution==0.6.8
> django-pipeline==1.2.24
> docutils==0.10
> feedparser==5.1.3
> mimeparse==0.1.3
> nose==1.2.1
> paramiko==1.9.0
> pycrypto==2.6
> python-dateutil==1.5
> python-memcached==1.48
>
>
> --
> Want to help the Review Board project? Donate today at
> http://www.reviewboard.org/donate/
> Happy use

Re: unable to install python-ldap

2013-02-11 Thread kapila narang
CentOS release 5.8 (Final)


On Tue, Feb 12, 2013 at 12:43 PM, Christian Hammond wrote:

> Assuming this is a Linux system, what distro/version is it?
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> Review Board - http://www.reviewboard.org
> VMware, Inc. - http://www.vmware.com
>
> On Feb 11, 2013, at 11:13 PM, kapila narang 
> wrote:
>
> thanks Christian for the reply. But can you elaborate what you meant by
> package manager here.
> I installed from easy_install so what i m missing here?
>
>
> On Tue, Feb 12, 2013 at 11:51 AM, Christian Hammond 
> wrote:
>
>> Looks like you're missing the appropriate LDAP development headers. You
>> can likely get this from your package manager.
>>
>> Christian
>>
>> --
>> Christian Hammond - chip...@chipx86.com
>> Review Board - http://www.reviewboard.org
>> VMware, Inc. - http://www.vmware.com
>>
>> On Feb 11, 2013, at 10:20 PM, cmuser  wrote:
>>
>>
>> Any help is appreciated.
>> Error-
>>
>> $>easy_install python-ldap
>>
>>  Searching for python-ldap
>> Reading http://pypi.python.org/simple/python-ldap/
>> Reading http://www.python-ldap.org/
>> Best match: python-ldap 2.4.10
>> Downloading
>> http://pypi.python.org/packages/source/p/python-ldap/python-ldap-2.4.10.tar.gz#md5=a15827ca13c90e9101e5e9405c1d83be
>> Processing python-ldap-2.4.10.tar.gz
>> Running python-ldap-2.4.10/setup.py -q bdist_egg --dist-dir
>> /tmp/easy_install-cI4tUz/python-ldap-2.4.10/egg-dist-tmp-O-OCjt
>> defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
>> extra_compile_args:
>> extra_objects:
>> include_dirs: /opt/openldap-RE24/include /usr/include/sasl /usr/include
>> library_dirs: /opt/openldap-RE24/lib /usr/lib
>> libs: ldap_r
>> file Lib/ldap.py (for module ldap) not found
>> file Lib/ldap/controls.py (for module ldap.controls) not found
>> file Lib/ldap/extop.py (for module ldap.extop) not found
>> file Lib/ldap/schema.py (for module ldap.schema) not found
>> warning: no files found matching 'Makefile'
>> warning: no files found matching 'Modules/LICENSE'
>> file Lib/ldap.py (for module ldap) not found
>> file Lib/ldap/controls.py (for module ldap.controls) not found
>> file Lib/ldap/extop.py (for module ldap.extop) not found
>> file Lib/ldap/schema.py (for module ldap.schema) not found
>> file Lib/ldap.py (for module ldap) not found
>> file Lib/ldap/controls.py (for module ldap.controls) not found
>> file Lib/ldap/extop.py (for module ldap.extop) not found
>> file Lib/ldap/schema.py (for module ldap.schema) not found
>> In file included from Modules/LDAPObject.c:9:
>> Modules/errors.h:8:18: error: lber.h: No such file or directory
>> Modules/errors.h:9:18: error: ldap.h: No such file or directory
>> In file included from Modules/LDAPObject.c:9:
>> Modules/errors.h:12: error: expected â)â before â*â token
>> In file included from Modules/LDAPObject.c:11:
>> Modules/LDAPObject.h:12:2: error: #error Current python-ldap requires
>> OpenLDAP 2.x
>> In file included from Modules/LDAPObject.c:11:
>> Modules/LDAPObject.h:23: error: expected specifier-qualifier-list before
>> âLDAPâ
>> Modules/LDAPObject.h:31: error: expected â)â before â*â token
>> In file included from Modules/LDAPObject.c:12:
>> Modules/ldapcontrol.h:11: error: expected â)â before â*â token
>> Modules/ldapcontrol.h:12: error: expected declaration specifiers or â...â
>> before âLDAPControlâ
>> Modules/ldapcontrol.h:13: error: expected â)â before â*â token
>> In file included from Modules/LDAPObject.c:13:
>> Modules/message.h:11: error: expected â)â before â*â token
>> In file included from Modules/LDAPObject.c:14:
>> Modules/berval.h:10: warning: âstruct bervalâ declared inside parameter
>> list
>> Modules/berval.h:10: warning: its scope is only this definition or
>> declaration, which is probably not what you want
>> Modules/berval.h:12: warning: âstruct bervalâ declared inside parameter
>> list
>> Modules/berval.h:13: warning: âstruct bervalâ declared inside parameter
>> list
>> Modules/LDAPObject.c:18:18: error: sasl.h: No such file or directory
>> Modules/LDAPObject.c:26: error: expected â)â before â*â token
>> Modules/LDAPObject.c: In function âdeallocâ:
>> Modules/LDAPObject.c:42: error: âLDAPObjectâ has no member named âldapâ
>> Modules/LDAPObject.c:43: error: âLDAPObjectâ has no member named âvalidâ
>> Modules/LDAPObject.c:44: error: âLDAPObjectâ has no member named â_saveâ
>> Modules/LDAPObject.c:44: error: âLDAPObjectâ has no member named

Re: unable to install python-ldap

2013-02-11 Thread kapila narang
well i have tried this so far

[root@cmconsol1 ~]# yum install python-ldap
Package python-ldap-2.2.0-2.1.x86_64 already installed and latest version

but still getting this error on the Admin page
LDAP authentication requires the python-ldap library, which is not
installed.


On Tue, Feb 12, 2013 at 12:49 PM, Christian Hammond wrote:

> So on CentOS, your package manager is called "yum". This is going to be an
> essential part of managing your CentOS install, so you'll need to make sure
> you're familiar with it.
>
> "yum search ldap" will return a list of packages matching "ldap." There
> should be some sort of -devel package for it. openldap-devel perhaps (I
> don't have CentOS here).
>
> When in doubt, Google for how to install the Python ldap module on CentOS.
> Surely someone has detailed instructions.
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> Review Board - http://www.reviewboard.org
> VMware, Inc. - http://www.vmware.com
>
> On Feb 11, 2013, at 11:17 PM, kapila narang 
> wrote:
>
> CentOS release 5.8 (Final)
>
>
> On Tue, Feb 12, 2013 at 12:43 PM, Christian Hammond 
> wrote:
>
>> Assuming this is a Linux system, what distro/version is it?
>>
>> Christian
>>
>> --
>> Christian Hammond - chip...@chipx86.com
>> Review Board - http://www.reviewboard.org
>> VMware, Inc. - http://www.vmware.com
>>
>> On Feb 11, 2013, at 11:13 PM, kapila narang 
>> wrote:
>>
>> thanks Christian for the reply. But can you elaborate what you meant by
>> package manager here.
>> I installed from easy_install so what i m missing here?
>>
>>
>> On Tue, Feb 12, 2013 at 11:51 AM, Christian Hammond 
>> wrote:
>>
>>> Looks like you're missing the appropriate LDAP development headers. You
>>> can likely get this from your package manager.
>>>
>>> Christian
>>>
>>> --
>>> Christian Hammond - chip...@chipx86.com
>>> Review Board - http://www.reviewboard.org
>>> VMware, Inc. - http://www.vmware.com
>>>
>>> On Feb 11, 2013, at 10:20 PM, cmuser  wrote:
>>>
>>>
>>> Any help is appreciated.
>>> Error-
>>>
>>> $>easy_install python-ldap
>>>
>>>  Searching for python-ldap
>>> Reading http://pypi.python.org/simple/python-ldap/
>>> Reading http://www.python-ldap.org/
>>> Best match: python-ldap 2.4.10
>>> Downloading
>>> http://pypi.python.org/packages/source/p/python-ldap/python-ldap-2.4.10.tar.gz#md5=a15827ca13c90e9101e5e9405c1d83be
>>> Processing python-ldap-2.4.10.tar.gz
>>> Running python-ldap-2.4.10/setup.py -q bdist_egg --dist-dir
>>> /tmp/easy_install-cI4tUz/python-ldap-2.4.10/egg-dist-tmp-O-OCjt
>>> defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
>>> extra_compile_args:
>>> extra_objects:
>>> include_dirs: /opt/openldap-RE24/include /usr/include/sasl /usr/include
>>> library_dirs: /opt/openldap-RE24/lib /usr/lib
>>> libs: ldap_r
>>> file Lib/ldap.py (for module ldap) not found
>>> file Lib/ldap/controls.py (for module ldap.controls) not found
>>> file Lib/ldap/extop.py (for module ldap.extop) not found
>>> file Lib/ldap/schema.py (for module ldap.schema) not found
>>> warning: no files found matching 'Makefile'
>>> warning: no files found matching 'Modules/LICENSE'
>>> file Lib/ldap.py (for module ldap) not found
>>> file Lib/ldap/controls.py (for module ldap.controls) not found
>>> file Lib/ldap/extop.py (for module ldap.extop) not found
>>> file Lib/ldap/schema.py (for module ldap.schema) not found
>>> file Lib/ldap.py (for module ldap) not found
>>> file Lib/ldap/controls.py (for module ldap.controls) not found
>>> file Lib/ldap/extop.py (for module ldap.extop) not found
>>> file Lib/ldap/schema.py (for module ldap.schema) not found
>>> In file included from Modules/LDAPObject.c:9:
>>> Modules/errors.h:8:18: error: lber.h: No such file or directory
>>> Modules/errors.h:9:18: error: ldap.h: No such file or directory
>>> In file included from Modules/LDAPObject.c:9:
>>> Modules/errors.h:12: error: expected â)â before â*â token
>>> In file included from Modules/LDAPObject.c:11:
>>> Modules/LDAPObject.h:12:2: error: #error Current python-ldap requires
>>> OpenLDAP 2.x
>>> In file included from Modules/LDAPObject.c:11:
>>> Modules/LDAPObject.h:23: error: expected specifier-qualifier-list before
>>> âLDAPâ
>>> Modules/LDAPObj

Re: unable to install python-ldap

2013-02-12 Thread kapila narang
thanks yes i tried everything.
Finally it has worked not trying my company authentication credentials
Compatible version which worked is python-ldap-2.3.13

Thanks Christian for all your support.


On Tue, Feb 12, 2013 at 12:56 PM, Christian Hammond wrote:

> Did you restart Apache after installing it?
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> Review Board - http://www.reviewboard.org
> VMware, Inc. - http://www.vmware.com
>
> On Feb 11, 2013, at 11:25 PM, kapila narang 
> wrote:
>
> well i have tried this so far
>
> [root@cmconsol1 ~]# yum install python-ldap
> Package python-ldap-2.2.0-2.1.x86_64 already installed and latest version
>
> but still getting this error on the Admin page
> LDAP authentication requires the python-ldap library, which is not
> installed.
>
>
> On Tue, Feb 12, 2013 at 12:49 PM, Christian Hammond 
> wrote:
>
>> So on CentOS, your package manager is called "yum". This is going to be
>> an essential part of managing your CentOS install, so you'll need to make
>> sure you're familiar with it.
>>
>> "yum search ldap" will return a list of packages matching "ldap." There
>> should be some sort of -devel package for it. openldap-devel perhaps (I
>> don't have CentOS here).
>>
>> When in doubt, Google for how to install the Python ldap module on
>> CentOS. Surely someone has detailed instructions.
>>
>> Christian
>>
>> --
>> Christian Hammond - chip...@chipx86.com
>> Review Board - http://www.reviewboard.org
>> VMware, Inc. - http://www.vmware.com
>>
>> On Feb 11, 2013, at 11:17 PM, kapila narang 
>> wrote:
>>
>> CentOS release 5.8 (Final)
>>
>>
>> On Tue, Feb 12, 2013 at 12:43 PM, Christian Hammond 
>> wrote:
>>
>>> Assuming this is a Linux system, what distro/version is it?
>>>
>>> Christian
>>>
>>> --
>>> Christian Hammond - chip...@chipx86.com
>>> Review Board - http://www.reviewboard.org
>>> VMware, Inc. - http://www.vmware.com
>>>
>>> On Feb 11, 2013, at 11:13 PM, kapila narang 
>>> wrote:
>>>
>>> thanks Christian for the reply. But can you elaborate what you meant by
>>> package manager here.
>>> I installed from easy_install so what i m missing here?
>>>
>>>
>>> On Tue, Feb 12, 2013 at 11:51 AM, Christian Hammond >> > wrote:
>>>
>>>> Looks like you're missing the appropriate LDAP development headers. You
>>>> can likely get this from your package manager.
>>>>
>>>> Christian
>>>>
>>>> --
>>>> Christian Hammond - chip...@chipx86.com
>>>> Review Board - http://www.reviewboard.org
>>>> VMware, Inc. - http://www.vmware.com
>>>>
>>>> On Feb 11, 2013, at 10:20 PM, cmuser  wrote:
>>>>
>>>>
>>>> Any help is appreciated.
>>>> Error-
>>>>
>>>> $>easy_install python-ldap
>>>>
>>>>  Searching for python-ldap
>>>> Reading http://pypi.python.org/simple/python-ldap/
>>>> Reading http://www.python-ldap.org/
>>>> Best match: python-ldap 2.4.10
>>>> Downloading
>>>> http://pypi.python.org/packages/source/p/python-ldap/python-ldap-2.4.10.tar.gz#md5=a15827ca13c90e9101e5e9405c1d83be
>>>> Processing python-ldap-2.4.10.tar.gz
>>>> Running python-ldap-2.4.10/setup.py -q bdist_egg --dist-dir
>>>> /tmp/easy_install-cI4tUz/python-ldap-2.4.10/egg-dist-tmp-O-OCjt
>>>> defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
>>>> extra_compile_args:
>>>> extra_objects:
>>>> include_dirs: /opt/openldap-RE24/include /usr/include/sasl /usr/include
>>>> library_dirs: /opt/openldap-RE24/lib /usr/lib
>>>> libs: ldap_r
>>>> file Lib/ldap.py (for module ldap) not found
>>>> file Lib/ldap/controls.py (for module ldap.controls) not found
>>>> file Lib/ldap/extop.py (for module ldap.extop) not found
>>>> file Lib/ldap/schema.py (for module ldap.schema) not found
>>>> warning: no files found matching 'Makefile'
>>>> warning: no files found matching 'Modules/LICENSE'
>>>> file Lib/ldap.py (for module ldap) not found
>>>> file Lib/ldap/controls.py (for module ldap.controls) not found
>>>> file Lib/ldap/extop.py (for module ldap.extop) not found
>>>> file Lib/ldap/schema.py (for module ldap.schema) not found
>>>&g

Re: Authentication problems with 1.5 api via perl.

2013-02-26 Thread kapila narang
Thanks for giving me the lead.. i will try that out.
Apologize for miscommunication.

On Tue, Feb 26, 2013 at 3:59 PM, Christian Hammond wrote:

> Go back and thoroughly read and understand the API documentation. Read the
> post-review source code. You're taking wild stabs in the dark with
> incorrect fields and URLs. That URL you're posting to is not an API URL.
>
> Also, keep all this to *one* thread. There's posts from you about this all
> over the place now, and that's not okay.
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
>
> Review Board - http://www.reviewboard.org
> VMware, Inc. - http://www.vmware.com
>
> On Feb 26, 2013, at 2:23 AM, cmuser  wrote:
>
> Sorry for disturbing you all asking such stupid question. But i am badly
> stuck. :(
> This is what i tried now, still no gain
>
> curl   -k -H "Authorization: Basic YWRtaW46YWRtaW4=" -X POST  -d
> "repository_id=cvsrepo&username=kapila&password=kapila123&submit-as=kapila"
> http://codereview.xyz.com/r/new/
>
> wondering why this command worked yesterday once
>
>  curl   -k -H "Authorization: Basic YWRtaW46YWRtaW4=" -X POST  -d
> "{\"repository_id\":
> "cvsrepo",\"repository_path\":":pserver:kapilap:kapila123@svn:/opt/cvsroot",\"username\":"kapila",\"password\":"kapila123",\"submit-as\":"kapila"}"
> "http://codereview.xyz.com/r/new/";
>
> @gavin, I am trying to integrate Bugzilla with Reviewboard so as a review
> request gets created whenever a new bug filled.
>
> On Tuesday, February 26, 2013 2:34:05 PM UTC+5:30, Christian Hammond wrote:
>>
>> The curl command is pretty wrong.
>>
>> You're still not passing an Authorization header. -H by itself doesn't
>> turn the value into one. You're also submitting JSON data, not form data.
>> The server won't be able to recognize any of that.
>>
>> Christian
>>
>> --
>> Christian Hammond - chi...@chipx86.com
>> Review Board - http://www.reviewboard.org
>> VMware, Inc. - http://www.vmware.com
>>
>> On Feb 26, 2013, at 12:45 AM, cmuser  wrote:
>>
>> Thanks. I  will try & follow it.
>> What i did is , tried writing the script(mentioned above) to post a
>> review request which is failing of xyz reason. So thought of using
>> HTTP::Recorder to get the script of posting a review request. But again
>> facing issues in that.
>>
>> curl command which worked once -
>> curl   -k -H "Basic YWRtaW46YWRtaW4=" -X POST  -d "{\"repository_id\":
>> "cvsrepo",\"repository_path\":**":pserver:kapila:kapila123@svn**
>> :/opt/cvsroot",\"username\":"**kapila",\"password\":"**
>> kapila123",\"submit-as\":"**kapila"}"  
>> "http://codereview.xyz.com/r/**new
>>
>> Would be great if you can share your script to give quick & better
>> understanding.
>>
>> On Tuesday, February 26, 2013 2:08:54 PM UTC+5:30, Gavin Main wrote:
>>>
>>> After a bit of fiddling and research I found that the LWP and
>>> HTTP::Cookies modules worked for me. Have a look at the documentation on
>>> CPAN
>>>
>>> http://search.cpan.org/~gaas/**HTTP-Cookies-6.01/lib/HTTP/**Cookies.pm
>>>
>>> This link was also very helful:
>>> http://lwp.interglacial.com/**ch11_01.htm
>>>
>>>
>>> Basically I wanted my post-commit hook to close out an associated review
>>> on Reviewboard. So I wrote two subroutines to do that. The first generated
>>> the cookie:
>>> - create the cookie file
>>> - issue the get request with HTTP::Request
>>> - authenticate with authorization_basic
>>> - extract the cookie
>>> - return hash
>>>
>>> Then I passed the cookie hash to another subroutine which issued my PUT
>>> request with the information inside the cookie hash.
>>>
>>> Cheers,
>>> Gavin
>>>
>>>
>>> On Monday, 25 February 2013 21:25:13 UTC+8, cmuser wrote:

 i have tried to built like this,but still not working

 #!/usr/local/bin/perl

 use LWP::UserAgent;
 use MIME::Base64;

 $url="http://codereview.xyz.**com/api/review-requests/ 
 ";
 $newurl="http://codereview.**xyz.com/r/new/ 
 ";
 $user="admin";
 $pwd="admin";

 $text="$user:$pwd";
 $text = encode_base64($text);
 #print "Encoded text: $text\n";
 %param =(
 "repository_id" =>"cvsrepo",
 "repository_path" =>":pserver:user:pwd\@svn:/**opt/cvsroot",
 "username" => "admin",
 "password" => "admin",
 "submit-as" => "username",
 );
my $ua = LWP::UserAgent->new;
 $ua->timeout(TIMEOUT);
 $ua->protocols_allowed(['http'**, 'https']);
 $ua->default_header('Basic' => $text);
 $ua->credentials($newurl,$**user,$pwd);

 $resp = $ua->get($url);
 print($resp->status_line(), "\n");

 print("Add handler:\n");
 $ua->add_handler( response_header => sub { print "HANDLER\n"; }, 
 %param);