Comments (10)
I forgot to mention that sync does work as long as I run on the svn server and
specify the path. The commits are successfully added to the Bugzilla bug in
this case. However sync gives the same error as mentioned earlier when
specifying the server URL.
This works:
perl sync.pl --type=Svn [email protected] --verbose
file:///opt/repos/svn/myrepo/
This gives same authentication error as mentioned earlier:
perl sync.pl --type=Svn [email protected] --verbose
http://my_host/repos/svn/myrepo
Original comment by [email protected]
on 24 Apr 2011 at 5:25
from bugzilla-vcs.
I don't see how the Subversion credentials ever get passed into the Bugzilla
VCS.add_commit service so that it can use them when connecting to Subversion.
In lib/VCI/VCS/Svn.pm, the SVN::Client gets created with empty config hash:
sub _build_x_client {
my $self = shift;
return SVN::Client->new(config => {});
}
When running the hook.pl script, I can see the access to the Subversion
repository in the access log file. There is an OPTIONS call that returns http
code = 401 which fails the hook.pl invocation.
The credentials for the Subversion user reside in the directory:
$HOME/.subversion//auth/svn.simple
and I can verify that the respective user can access Subversion using the
standard svn command line client with these credentials. I just don't see where
the SVN::Client ever gets the credentials.
How can I help Bugzilla to use the correct Subversion credentials so that it
won't fail?
Original comment by [email protected]
on 5 May 2011 at 7:30
from bugzilla-vcs.
Hey! The authentication feature is actually missing in the underlying VCI
library from CPAN. However, I'm also the maintainer of that library, so you're
welcome to send me a patch to it.
Original comment by [email protected]
on 6 May 2011 at 6:29
from bugzilla-vcs.
[deleted comment]
from bugzilla-vcs.
Original comment by [email protected]
on 11 May 2011 at 6:13
Attachments:
from bugzilla-vcs.
Well after some digging, I located two places where svn authentication was
involved in the VCI library. I was able to get sync.pl and hook.pl working with
svn auth.
The 2 modified files were:
-- lib/VCI/VCS/Svn/Repository.pm
-- lib/VCI/VCS/Svn.pm
Note that these are just hacks at this point to put the svn auth into place.
Credentials could be read in from a file (or maybe the .subversion auth data?)
- this was just to test out where the auth was needed in the VCI code.
I added an auth hash to the client new like so:
For example in Svn.pm, _build_x_client becomes:
sub _build_x_client {
my $self = shift;
return SVN::Client->new(
auth => [SVN::Client::get_simple_provider(),
SVN::Client::get_simple_prompt_provider(
sub {
my $cred = shift;
$cred->username("fog");
$cred->password("bank");
},
2
),
SVN::Client::get_username_provider()]);
}
I'm not that sure how to leverage the .subversion auth info though - must be a
way to read it in, or maybe the svn driver can already do this?
Original comment by [email protected]
on 11 May 2011 at 6:49
from bugzilla-vcs.
it seems that without the correct credentials, none will be able to use
subversion ever again....
Original comment by [email protected]
on 11 May 2012 at 6:03
from bugzilla-vcs.
Hello Pat,
I got same problem here, it seems VCI library failed to authenticate the
subversion repository.It ignoring the local svn credentials in the homedir.
I am not familiar with VCI api,so I got stuck here. I googled it and didn't
find hint for this issue.
Did you manage to resolve this issue?
Maybe patch?
Thanks,
Assaf R
Original comment by [email protected]
on 3 Dec 2012 at 8:43
from bugzilla-vcs.
I had to struggle with it.... I had to update the Svn.pm and the
lib/VCI/VCS/Svn/Repository.pm:
has 'x_ra' => (is => 'ro', isa => 'SVN::Ra', lazy => 1,
default => sub { SVN::Ra->new(
url => shift->x_root_noslash,
auth => [ SVN::Client::get_simple_provider(),
SVN::Client::get_simple_prompt_provider
(
\&getauth,2
),
SVN::Client::get_username_provider()
],
);
});
Original comment by [email protected]
on 4 Dec 2012 at 3:15
from bugzilla-vcs.
...also, another important feature missing is the ability to make the "commits"
private, as comments are.
After digging some more I found it:
edit this file:
./bugzilla/extensions/VCS/template/en/default/hook/bug/edit-after_custom_fields.
html.tmpl
i.e.
[%IF user.is_insider %]
[% RETURN UNLESS bug.vcs_commits.size %]
<tr id="commits">
<th class="field_label commits_label">
<a href="#commits">[% field_descs.vcs_commits FILTER html %]:</a>
</th>
<td></td>
</tr>
<tr>
<td colspan="2">
<div class="bz_private_checkbox">
<input type="hidden" value="1"
name="defined_isprivate_[% comment.id %]">
</div>
[% PROCESS "vcs/commits.html.tmpl" %]
</div>
</td>
</tr>
[% END %]
I hope I earned my two cents... ;)
Assaf
Original comment by [email protected]
on 4 Dec 2012 at 3:21
from bugzilla-vcs.
Related Issues (20)
- hook.pl assumes multiple projects in one svn repository HOT 5
- Can't locate object method "repository" via package "Git" HOT 3
- SVN Commit Message Includes BR Tags HOT 13
- 404 error running hook.pl with mercurial v4.0 with Hg HOT 2
- sync.pl (Git) is examining all commits all the time HOT 5
- hook.pl & sync.pl not commiting to oracle db correctly
- Running hook.pl causes xmlrpc.cgi to hang at 100% CPU
- Commit output not formatted correctly. HOT 4
- checksetup.pl tell me that I must install VCI module for perl but it is already installed HOT 2
- Bugzilla does not show any change
- Advance search does not work HOT 2
- The 'nanosecond' parameter ("...") to DateTime::new did not pass the 'a positive integer' callback
- Running hook.pl/sync.pl error
- RPC::XML::Client::send_request: HTTP server error
- VCS Integration with Bugzilla on Windows 32 bit Machine with ActiveState Perl Requires AlienSVN for which There is No Available Working Build
- Can't locate object method "simple_request"
- Syntax error in extension.pm
- 'Svn' is not a valid VCS
- Software fails to install with perl v5.18.2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bugzilla-vcs.