Closed RVLIN closed 3 years ago
Hi TheRijn,
I have try to modify phpliteadmin file, but problem still excited. However, thanks your help! below is my git status info.
old mode 100644 new mode 100755 diff --git a/files/opt/cs50/phpliteadmin/bin/phpliteadmin b/files/opt/cs50/phpliteadmin/bin/phpliteadmin index 73420b7..7539979 100755 --- a/files/opt/cs50/phpliteadmin/bin/phpliteadmin +++ b/files/opt/cs50/phpliteadmin/bin/phpliteadmin @@ -117,7 +117,14 @@ if [ ! $ticks ]; then exit 1 fi
-URL="$(echo "http://$(hostname -i):$PORT/?password=$password" | hostname50)" +#URL="$(echo "http://$(hostname -i):$PORT/?password=$password" | hostname50)" + +# Create a different URL depending on the IDE type +if [[ $CS50_IDE_TYPE -eq offline ]]; then
@RVLIN Did you manage to edit the file in the ide? It seems protected, but I don't have the sudo password.
@RVLIN Did you manage to edit the file in the ide? It seems protected, but I don't have the sudo password. I cannot edit the file in the ide, because I cannot clone Cloud 9. And I still cannot use ide in the offline, I think we need help.
I'm afraid cs50/cloud9 is closed source for now!
I'm afraid cs50/cloud9 is closed source for now!
So we probably cannot use CS50 IDE in the offline, right?
I'm afraid cs50/cloud9 is closed source for now!
So we probably cannot use CS50 IDE in the offline, right?
Just run:
docker run -e C9_HOSTNAME=0.0.0.0 -e CS50_IDE_TYPE=offline -i --name ide -p1337:1337 -p8080-8082:8080-8082 --rm --security-opt seccomp=unconfined -t --workdir /opt/c9 cs50/ide:latest
Change /opt/c9
to a local folder you want to bind to the ide.
Or use https://github.com/cs50/ide50 🤷🏼♂️
I'm afraid cs50/cloud9 is closed source for now!
So we probably cannot use CS50 IDE in the offline, right?
Just run:
docker run -e C9_HOSTNAME=0.0.0.0 -e CS50_IDE_TYPE=offline -i --name ide -p1337:1337 -p8080-8082:8080-8082 --rm --security-opt seccomp=unconfined -t --workdir /opt/c9 cs50/ide:latest
Change
/opt/c9
to a local folder you want to bind to the ide.Or use https://github.com/cs50/ide50 🤷🏼♂️
I try to use your command and add your commit to cannot use cs50 ide in the offline, but I still cannot use it..... Below is my log: root@ubuntu1604-server:/home/robin/ide# git diff diff --git a/files/opt/cs50/phpliteadmin/bin/phpliteadmin b/files/opt/cs50/phpliteadmin/bin/phpliteadmin index 73420b7..25f4b07 100755 --- a/files/opt/cs50/phpliteadmin/bin/phpliteadmin +++ b/files/opt/cs50/phpliteadmin/bin/phpliteadmin @@ -116,8 +116,12 @@ if [ ! $ticks ]; then echo_err "Timed out." exit 1 fi +if [[ $CS50_IDE_TYPE -eq offline ]]; then
-URL="$(echo "http://$(hostname -i):$PORT/?password=$password" | hostname50)" if [[ $URL_ONLY ]]; then echo "$URL" else root@ubuntu1604-server:/home/robin/ide# ^C root@ubuntu1604-server:/home/robin/ide# docker run -e C9_HOSTNAME=0.0.0.0 -e CS50_IDE_TYPE=offline -i --name ide -p1337:1337 -p8080-8082:8080-8082 --rm --security-opt seccomp=unconfined -t --workdir /home/robin/ide/files/opt/cs50/ cs50/ide:latest changing ownership of /home/ubuntu to ubuntu:ubuntu... starting rsyslog...
@cs50/ide@4.1.0 standalone /opt/c9/packages/cs50 node ./standalone.js -p 1337 --listen 0.0.0.0 -a $USER:$AUTH -w /home/ubuntu --startLocation /static/@cs50/ide/cdn/ide.html --setting-path /home/ubuntu/.config/.c9
Starting /opt/c9/packages/cs50/configs/standalone version 4.1.0/testing in mode "/opt/c9/packages/cs50/settings/standalone" CDN: version standalone initialized /opt/c9/packages/ide/build Started /opt/c9/packages/cs50/configs/standalone with config /opt/c9/packages/cs50/settings/standalone! Cloud9 is up and running Node version: v12.20.1 Connect server listening at http://172.17.0.2:1337
@RVLIN to use the CS50 IDE Offline, check out https://cs50.readthedocs.io/ide/offline!
@RVLIN to use the CS50 IDE Offline, check out https://cs50.readthedocs.io/ide/offline!
Thanks for your help, I try again and fix the some problem but another problem arises Now I'm working on how to fix this new problem Below is my problem description:
When I type command: ide50 start and show below error massage
root@ubuntu1604-server:/home/robin# ide50 start
Traceback (most recent call last):
File "/usr/local/bin/ide50", line 7, in <module>
from ide50.__main__ import main
File "/usr/local/lib/python3.5/dist-packages/ide50/__main__.py", line 143
assert digest == f"{repository}@{response['digest']}"
I find the problem is an extra f in the last code
File "/usr/local/lib/python3.5/dist-packages/ide50/__main__.py", line 143
assert digest == f"{repository}@{response['digest']}"
When I delete all f in the __main__.py
Try again type command: ide50 start
and another problem arises: json.decoder.JSONDecodeError: Expecting value:
Traceback (most recent call last):
File "/usr/local/bin/ide50", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.5/dist-packages/ide50/__main__.py", line 73, in main
args.func(args)
File "/usr/local/lib/python3.5/dist-packages/ide50/__main__.py", line 175, in start
pull(args.image)
File "/usr/local/lib/python3.5/dist-packages/ide50/__main__.py", line 140, in pull
response = requests.get("https://hub.docker.com/v2/repositories/{repository}/tags/{tag}").json()["images"][0]
File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
CS50's command-line tools all require Python 3.6 or higher! Seems you have 3.5!
CS50's command-line tools all require Python 3.6 or higher! Seems you have 3.5!
I can use ide50 in the offline. Thanks you!!!!!!!!!
Dear everyone, I have a question for you at present. When I run the command
make dev
to clone Cloud 9, I can't clone Cloud 9.Here's the error message:
21 0.316 Cloning into '/opt/c9'...
21 1.011 Warning: Permanently added the RSA host key for IP address '52.69.186.44' to the list of known hosts.
21 2.406 ERROR: Repository not found.
21 2.406 fatal: Could not read from remote repository.
21 2.406
21 2.406 Please make sure you have the correct access rights
21 2.406 and the repository exists.
Can someone help me solve this problem, please?