5

Running 10.7.4, I ran the following:

mkdir -p /opt/mports
cd /opt/mports
svn checkout https://svn.macports.org/repository/macports/trunk
cd trunk/base
./configure --enable-readline
make
sudo make install
make distclean

Then I ran nano /opt/local/etc/macports/sources.conf, commented out rsync://rsync.macports.org/release/tarballs/ports.tar and added in file://opt/mports/trunk/dports [default]

After running sudo port -d sync I received

DEBUG: Copying /Volumes/Storagestar/Users/themikemasterson/Library/Preferences/com.apple.dt.Xcode.plist to /opt/local/var/macports/home/Library/Preferences
--->  Updating the ports tree
Synchronizing local ports tree from file:///opt/mports/trunk/dports
DEBUG: /usr/bin/svn update --non-interactive /opt/mports/trunk/dports
DEBUG: changing euid/egid - current euid: 0 - current egid: 0
svn: OPTIONS of 'https://svn.macports.org/repository/macports/trunk': Server certificate verification failed: issuer is not trusted (https://svn.macports.org)
Command failed: /usr/bin/svn update --non-interactive /opt/mports/trunk/dports
Exit code: 1
DEBUG: command execution failed
while executing
"system $svn_commandline"
Error: Synchronization of the local ports tree failed doing an svn update
DEBUG: Synchronization of 1 source(s) failed
while executing
"mportsync [array get global_options]"
port sync failed: Synchronization of 1 source(s) failed

Updating via rsync works fine, but not when using local sources. Also, I was given the option to accept the certificate when checking out at the beginning, and I chose to accept it permanently.

Spoony
  • 51
  • 4

2 Answers2

5

The answer provided by @Vortexfive is half-right. Do as he says then copy .subversion from your home directory into /opt/local/var/macports/home:

$ sudo bash
# find ~/.subversion/auth -type f -exec rm -f {} \;
# cd /opt/mports/trunk
# svn update     (press 'p' to store the certificate)
# cd /opt/local/var/macports/home
# cp -R ~/.subversion .
# port selfupdate

Done!

trojanfoe
  • 120,358
  • 21
  • 212
  • 242
  • This was my last hurdle, to get around a work firewall, on OS X 10.11.4 using the instructions from [macports](https://trac.macports.org/wiki/howto/SyncingWithSVN) – Justin May 24 '16 at 16:44
3

Try to do manually (same as in logfile but without --non-interactive):

/usr/bin/svn update /opt/mports/trunk/dports

Now, you should get the message:

Error validating server certificate for 'https://svn.macports.org:443':
 - The certificate is not issued by a trusted authority. Use the
   fingerprint to validate the certificate manually!
Certificate information:
 - Hostname: *.macports.org
 - Valid: from Tue, 22 Feb 2011 17:29:43 GMT until Tue, 18 Mar 2014 23:36:56 GMT
 - Issuer: 07969287, http://certificates.godaddy.com/repository, GoDaddy.com, Inc., Scottsdale, Arizona, US
 - Fingerprint: ...
(R)eject, accept (t)emporarily or accept (p)ermanently?

If you choose p, svn will accept macports' certificate the next time you do port sync.

Vortexfive
  • 1,889
  • 13
  • 19
  • I am in a similar environment to the original poster. When I issue the command above, I do not have the option to accept permanently. – Zed Aug 28 '12 at 17:59
  • 1
    Actually, cancel the above. That turned out to be because `.subversion/config` contained `store_auth_creds = no`. Once I changed that, I could store again. – Zed Aug 28 '12 at 18:15
  • See my answer for the complete solution to this problem. – trojanfoe Aug 07 '13 at 12:52