Repository: helm/helm (go)

Issue:
Helm v3 Error when parsing the URL for helm chart save
### Situation

I've downloaded a chart and attempted to upload the chart to registry.
My registry is Harbor, installed in the Kubernetes cluster.
I've logged in the registry successfully with command `helm registry login -u admin --insecure 10.20.131.50:30003`
But when I tried to issue "helm chart save", it shows that the URL is incorrect
```
$ helm chart save harbor-helm/ 10.20.131.50:30003/library/harbor
Error: parse 10.20.131.50:30003/library/harbor: first path segment in URL cannot contain colon
```

while removing the port number and the colon will work

```
$ helm chart save harbor-helm/ 10.20.131.50/library/harbor:latest
ref:     10.20.131.50/library/harbor:latest
digest:  df10ae52f374f547d0f21951f72788acbdb3ae2d21c26c5e4cdb6327a7e40c48
size:    31.0 KiB
name:    harbor
version: 1.2.0-dev
latest: saved
```

but apparently that is not the correct registry endpoint, and that won't work while pushing charts to the registry.

In the [registries documentation](https://v3.helm.sh/docs/topics/registries/#the-chart-subcommand), it works perfectly with port number specified.

```
$ helm chart save mychart/ localhost:5000/myrepo/mychart:2.7.0
ref:     localhost:5000/myrepo/mychart:2.7.0
digest:  1b251d38cfe948dfc0a5745b7af5ca574ecb61e52aed10b19039db39af6e1617
size:    2.4 KiB
name:    mychart
version: 0.1.0
2.7.0: saved
```

### Version info

Output of `helm version`:
```
version.BuildInfo{Version:"v3.0.0", GitCommit:"e29ce2a54e96cd02ccfce88bee4f58bb6e2a28b6", GitTreeState:"clean", GoVersion:"go1.13.4"}
```

Output of `kubectl version`:
```
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:18:23Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.3", GitCommit:"b3cbbae08ec52a7fc73d334838e18d17e8512749", GitTreeState:"clean", BuildDate:"2019-11-13T11:13:49Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}
```

Cloud Provider/Platform (AKS, GKE, Minikube etc.): 
```
Ubuntu 18.04.3 LTS (Bionic Beaver)
kubeadm provisioned cluster on bare metal
```





Pull request:
Fixes repo parsing
<!--  Thanks for sending a pull request!  Here are some tips for you:
1. Make sure to read the Contributing Guide before submitting your PR: https://github.com/helm/helm/blob/master/CONTRIBUTING.md
2. If this PR closes another issue, add 'closes #<issue number>' somewhere in the PR summary. GitHub will automatically close that issue when this PR gets merged. Alternatively, adding 'refs #<issue number>' will not close the issue, but help provide the reviewer more context.-->

**What this PR does / why we need it**:
closes #6977
**Special notes for your reviewer**:
```
$ ./bin/helm chart list
REF	NAME	VERSION	DIGEST	SIZE	CREATED
$ ./bin/helm chart save /tmp/juned-test localhost:5000/juned-test:0.0.1
ref:     localhost:5000/juned-test:0.0.1
digest:  10da0e9928669a2ef8918f6c97d1a2d120a531d1d9a00fe6f286f30d08363917
size:    3.5 KiB
name:    juned-test
version: 0.1.0
0.0.1: saved
$ ./bin/helm chart save /tmp/juned-test 127.0.0.1:5000/juned-test:0.0.1
ref:     127.0.0.1:5000/juned-test:0.0.1
digest:  52da836ee4457e84a46b5566bebaaf39aeb7a1a32f8c11c9409d1a2ceff61f39
size:    3.5 KiB
name:    juned-test
version: 0.1.0
0.0.1: saved
$ ./bin/helm chart list
REF                            	NAME      	VERSION	DIGEST 	SIZE   	CREATED
127.0.0.1:5000/juned-test:0.0.1	juned-test	0.1.0  	52da836	3.5 KiB	5 seconds
localhost:5000/juned-test:0.0.1	juned-test	0.1.0  	10da0e9	3.5 KiB	12 seconds
```


Patch:
diff --git a/internal/experimental/registry/reference.go b/internal/experimental/registry/reference.go
index ced6cf33a..ebab29a7e 100644
--- a/internal/experimental/registry/reference.go
+++ b/internal/experimental/registry/reference.go
@@ -86,6 +86,7 @@ func (ref *Reference) FullName() string {
 
 // validate makes sure the ref meets our criteria
 func (ref *Reference) validate() error {
+
 	err := ref.validateRepo()
 	if err != nil {
 		return err
@@ -100,7 +101,7 @@ func (ref *Reference) validateRepo() error {
 	}
 	// Makes sure the repo results in a parsable URL (similar to what is done
 	// with containerd reference parsing)
-	_, err := url.Parse(ref.Repo)
+	_, err := url.Parse("//" + ref.Repo)
 	return err
 }
 


Test patch:
diff --git a/internal/experimental/registry/reference_test.go b/internal/experimental/registry/reference_test.go
index bb53ebab8..aae03ad99 100644
--- a/internal/experimental/registry/reference_test.go
+++ b/internal/experimental/registry/reference_test.go
@@ -81,6 +81,13 @@ func TestParseReference(t *testing.T) {
 	is.Equal("1.5.0", ref.Tag)
 	is.Equal("myrepo:5001/mychart:1.5.0", ref.FullName())
 
+	s = "127.0.0.1:5001/mychart:1.5.0"
+	ref, err = ParseReference(s)
+	is.NoError(err)
+	is.Equal("127.0.0.1:5001/mychart", ref.Repo)
+	is.Equal("1.5.0", ref.Tag)
+	is.Equal("127.0.0.1:5001/mychart:1.5.0", ref.FullName())
+
 	s = "localhost:5000/mychart:latest"
 	ref, err = ParseReference(s)
 	is.NoError(err)